Size: 705
Comment:
|
Size: 742
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
{{{ | {{{#!highlight c++ |
Line 9: | Line 9: |
g++ test.cpp -o test |
CPlusPlus
C++ programming language created by Bjarne Stroustrup
Sample app for Linux
1 /*
2 gcc test.cpp -lstdc++ -o test
3 cpp test.cpp -o test
4 g++ test.cpp -o test
5 */
6
7 #include<vector>
8 #include<iostream>
9 #include<sstream>
10
11 class Teste{
12 public:
13 Teste(std::string xyz){
14 std::cout << xyz << "\r\n";
15 }
16 };
17
18 int main(){
19 std::vector<int> listInst = std::vector<int>();
20 std::cout <<"Hello world \r\n";
21 std::ostringstream oss(std::ostringstream::out);
22 int a = 1234;
23 char xpto[16]="AAA BBB";
24 oss << a << xpto << "\r\n";
25
26 std::cout << oss.str();
27 //std::ostringstream ost = std::ostringstream(ostringstream::out);
28 Teste x1("Ola aaaaaaa");
29 return 0;
30 }