- 1
Why my codes on pc said that the comad hello world in invalid to eject
11 ответов
+ 7
There is nothing wrong with your code. Which compiler are you using on your desktop?
+ 6
@Kartikey That's why I'm asking about his compiler. If he is on Turbo C++, it is necessary for him to update to standard C++ instead of providing him with a solution which will make him think that it is fine to continue with an obsolete compiler.
+ 5
Just to clarify a few things here:
return 0 doesn't need to be explicitly stated for main().
void return type for main has never been part of standard C++, and it never will be.
http://www.stroustrup.com/bs_faq2.html#void-main
+ 4
Post your code @Juan so people can help
+ 4
you need to add return 0 before last bracket or use void main in place of int main
+ 4
My sixth sense says that possibly he is using Turbo C++ 😂
+ 4
@Juan, can you tell us what is the IDE or compiler that you use for this? it's important.
+ 3
@Rei void main will help if he is using Turbo C++.
0
#include <iostream>
using namespace std;
int main()
{cout << "this" << "is" <<"awesome" ; }
0
its in my computer
0
please add "return 0" in main method. because the main method need return type too...