By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

error C4430 on helloworld

P: 10
ok, i'm just starting out, with c++ and i downloaded some wideos, i'm working on VS.NET 2005, and hthe first script is helloworld
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2.  
  3. main()
  4. {
  5.     std::cout << "Hello World";
  6. }
and here's what i'm getting, the project is a win32 consol project

Error 1 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\darko\my documents\visual studio 2005\projects\test2\test2\helloworld.cpp 4

can anyone help me?
Sep 18 '06 #1
Share this Question
Share on Google+
2 Replies


Banfa
Expert Mod 5K+
P: 8,916
main()
{
...
}

is wrong, it should be either

int main()
{
...
return EXIT_SUCCESS;
}

or

int main(int argc, char**argp)
{
...
return EXIT_SUCCESS;
}

EXIT_SUCCESS is defined in stdlib.h
Sep 18 '06 #2

P: 10
thanks alot dude, that worked fine, i used inta main(), i'm sticking around this forum

Regards
darko
Sep 18 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.