On Fri, 2008-05-16 at 18:44 -0500, Trent wrote: > 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...
I know about the using namespace std; thing; I just did it that way because I wanted to stay with the book and I assumed the book had some purpose for not using 'using' at this point.
