MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap
Revision 2 as of 2014-06-25 22:32:43
  • CPlusPlus

CPlusPlus

C++ programming language created by Bjarne Stroustrup

Sample app for Linux

Toggle line numbers
   1 /*
   2 gcc test.cpp -lstdc++ -o test
   3 cpp test.cpp -o test
   4 */
   5 
   6 #include<vector>
   7 #include<iostream>
   8 #include<sstream>
   9 
  10 class Teste{
  11   public:
  12     Teste(std::string xyz){
  13       std::cout << xyz << "\r\n";
  14     }
  15 };
  16 
  17 int main(){
  18   std::vector<int> listInst = std::vector<int>(); 
  19   std::cout <<"Hello world \r\n";
  20   std::ostringstream oss(std::ostringstream::out);
  21   int a = 1234;
  22   char xpto[16]="AAA BBB";
  23   oss << a << xpto << "\r\n";
  24 
  25   std::cout << oss.str();
  26   //std::ostringstream ost = std::ostringstream(ostringstream::out);
  27   Teste x1("Ola aaaaaaa");
  28   return 0;
  29 }
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01