468,513 Members | 1,772 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,513 developers. It's quick & easy.

error C4430 on helloworld

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
2 5099
Banfa
9,056 Expert Mod 8TB
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
darko
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.

Similar topics

1 post views Thread by Tony Johansson | last post: by
reply views Thread by Tony Johansson | last post: by
2 posts views Thread by Tony Johansson | last post: by
2 posts views Thread by Michael D. Reed | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.