[ create a new paste ] login | about

Link: http://codepad.org/2rcU5DNI    [ raw code | output | fork ]

C, pasted on Nov 14:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <string>

using namespace std;

int main(void)
{
    string i;

    i = "hello";

    i.insert(0,2,"g");

    cout << i<<endl;
}


Output:
1
2
3
4
5
6
7
8
9
10
11
Line 19: error: iostream: No such file or directory
Line 17: error: string: No such file or directory
Line 4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namespace'
In function 'main':
Line 8: error: 'string' undeclared (first use in this function)
Line 8: error: (Each undeclared identifier is reported only once
Line 8: error: for each function it appears in.)
Line 8: error: expected ';' before 'i'
Line 10: error: 'i' undeclared (first use in this function)
Line 14: error: 'cout' undeclared (first use in this function)
Line 14: error: 'endl' undeclared (first use in this function)


Create a new paste based on this one


Comments: