Tyler Littlefield wrote:
> go to properties, and there is a place (project properties), anyway, under
> general for the type of app. choose console.
> your program will look like this:
> #include <iostream>
> using namespace std;
> int main(void) {
> cout << "Hello world!\n" << endl;
> system("pause");
>
NO, do NOT put system("pause"); in any program
> return 0;
> basically, when use using namespace, it checks for functions in the namespace.
> I don't know if you've gotten to functions, but all a namespace is, is a way
> of organizing. It can hold classes, functions, structures, etc. std:: is just
> refering to the cout found under namespace std.
> the system command will say "press any key to continue."
> after that returns, the program will finish.
> If you don't want to use system("pause") you can run the program from a
> command prompt (command.com, or cmd.exe)
> }
> Thanks,
> ~~TheCreator~~
> Visit TDS for quality software and website production
> http://tysdomain.com
> msn: [EMAIL PROTECTED]
> skype: st8amnd127
> ----- Original Message -----
> From: Trent
> To: [email protected]
> Sent: Friday, May 16, 2008 5:44 PM
> Subject: Re: [c-prog] Re: Hello World in Visual C++ 2008 Express [SOLVED]
>
>
> And instead of using std::
>
> Try "using namespace std;" as a header
>
> ----- Original Message -----
> From: "Michael Sullivan" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Thursday, May 15, 2008 2:04 PM
> Subject: [c-prog] Re: Hello World in Visual C++ 2008 Express [SOLVED]
>
> --- In [email protected], Michael Sullivan <[EMAIL PROTECTED]> wrote:
> >
> > I started the Accelerated C++ book on the reading list, and I typed in
> > the Hello World program into VC++ 2008. This is my first time using VC
> > ++ 2008. When I build the project, it tells me
> >
> > unresolved external symbol [EMAIL PROTECTED] reference in function
> > ___tmainCRTStartup
> >
> > The program I typed in does not have a function WinMain, just an int
> > main. On VC++ 6.0 I had an option to crate a console-mode application.
> > Is this option not available anymore? I can't seem to find it. Should
> > I change int main() to int WinMain()? Would that work?
> >
>
> Nevermind. I figured it out. I had already typed my source code in,
> and I guess the console mode application is not available from the New
> Project From Existing File method. I put the book's
>
> std::cout << "Hello, world!" << std::endl;
>
> into the int _tmain skeleton created by VC++. It built and ran, I
> assume correctly. The terminal window went away too quickly for me to
> actually tell, but I did see a terminal window...
>