Sign in to follow this  

Problem with strings

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;

      return 0;

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this