+ 2

What is integer value in c++

Int main() has int meaning integer, does this integer means only numbers?

4th Aug 2021, 5:19 AM
Sanjana Sinha
10 Antworten
+ 5
NotHuman we are talking about C++ (standard) not ++C language of course at the end of day only binary code matters ..
6th Aug 2021, 4:11 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
"int main()" means that function needs to return some integer at the end of the execution and we do so by returning 0 at the end of the program.
4th Aug 2021, 5:22 AM
Zohaib 👑
Zohaib 👑 - avatar
+ 1
Sanjana Sinha means that program executed successfully.
4th Aug 2021, 5:24 AM
Zohaib 👑
Zohaib 👑 - avatar
+ 1
ChillPill 🙃😌
6th Aug 2021, 12:06 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Returning to zero means?
4th Aug 2021, 5:23 AM
Sanjana Sinha
0
Sanjana Sinha return is a predefined keyword if u you about function than u can understood much better if you making any function rather than void it will return any values for example int calculate () this calculate will return int value u need to use return statement or u u writing like this float calculate () { Return statement } But in case of void calculate () { No return } If u writting anything apart from void you need to return any value it can be int float char ..... anything. In c language generally we using void main () as a main function but its removed in c98 as long year ago .And cpp is more strict than C so if u will use void main() as a main function in cpp it will give you warnings and error. when you using int main its necessary to use return keyword so we writting return 0 which denotes your program is successfully executed return 1 for failure. If u dont like to write return 0 then you can write like this return EXIT_SUCCESS ; same in case of failure return EXIT_FAILURE;
4th Aug 2021, 3:21 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
ChillPill sir can you pls tell about this. string code{ R"( #include <iostream> int main(){ std::cout << "helloworld" << std::endl; return 42; } )" }; How its working becz i never studied this
6th Aug 2021, 5:02 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
- 1
Возвращает - байты :)
5th Aug 2021, 6:17 PM
Александр J
Александр J - avatar
- 2
Martin Taylor (IYANR) C++ is language and its compilers are just some collection of files that can be modified. In addition to return type you can even rename main() function to nima() for example. If you want more you can give a new name to it like The ++C Language. If you have a country under your control universities will teach it instead of standart C++. Anyway text files are under our control even though we may not control countries. But in general you are right
6th Aug 2021, 12:55 AM
▬▬▬
▬▬▬ - avatar
- 4
yes it means that method can return only integer numbers. if you don't like you can change it to void, pointer .. it is free and under your control
4th Aug 2021, 5:25 AM
▬▬▬
▬▬▬ - avatar