1

So i'm just learning C++ doing basics out of a book and trying to stick to it, but it isn't making sense. And this project is from a book and say to do a Win32 Project (console application, empty project), and add a C++ file. The code is for a basic "Enter your first and last name" console application. So this is my code

#include <iostream>
#include <string>

int main()
{
std::string firstName = "";

std::cout << "Enter your first name and press Enter: ";

std::cin >> firstName;

std::cout << std::endl;

std::cout << "Hello, " << firstName << std::endl << std::endl;
}

and i know little about this stuff, but from my book it appears that the "include" is getting highlighted blue after entering it in. And that isn't happening. When i build it i get "1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup".

Im using VS 2010 Express. Any help or advice to what im doing wrong would be great! Thanks.

Marshal
  • 11
  • 2

0 Answers0