Basic string problem

Hello Cplusplus members,

I've been wanting to learn some C++ for a long time now. So I've came across this site while googling. To make this fast and short I'm stuck on the second beginners lesson.

You see I don't enjoy copy and pasting codes (I'd never learn my mistakes do that) any way. After reading about strings I've attempted to do the lesson in my VB C++ 08 compiler. Well I've copied word for word in this tutorial and it keeps giving me an error. So I was wounding if someone could tell me what I am doing wrong here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// operating with variables

#include <iostream>
#include <string>
using namespace std;

int main () 
{
	string mystring;
	mystring = "This is the initial string content";
	cout << mystring << end1;
	mystring = "This is a different string content";
	cout << mystring << end1;
	return 0;
}


When I copy and past the code in the tutorial it works, but when I type it out it doesn't..

Thanks for the help..
Last edited on
I've found the problem.

I type "end" with a 1 witch in the tutorial it was an "L" (they look so much alike :) )
Last edited on
Topic archived. No new replies allowed.