• Advertisement
Sign in to follow this  

Problem with strings

This topic is 4008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im trying to just create a simple string to practice and i keep getting these errors: 8 c:\docume~1\owner\mydocu~1\progra~1\main.cpp `string' undeclared (first use this function) 8 c:\docume~1\owner\mydocu~1\progra~1\main.cpp parse error before `;'
#include <iostream.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

int main()
{

      string CharacterName;

      CharacterName = "Timmy Boy!";

      cout << CharacterName;

      system("PAUSE");
      return 0;
}

Share this post


Link to post
Share on other sites
Advertisement
ok thanks, im using DEVCPP and it defaulted to including them with the '.h' so i naturally included the .h on the end of the string header without thinking.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement