Urho3D Wiki
(tested class highlighting in wiki playground)
Tags: apiedit Visual edit
(Firstly, it's iostream, not iosteam. And secondly, I added a cool thing I like to do with the int main() return number.)
Tag: rte-source
Line 2: Line 2:
   
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
#include <iosteam>
+
#include <iostream>
   
 
class TestClass {
 
class TestClass {
Line 8: Line 8:
 
int testVar_;
 
int testVar_;
 
};
 
};
  +
  +
int success;
   
 
int main() // "void main" is, and was always, wrong
 
int main() // "void main" is, and was always, wrong
 
{
 
{
  +
std::cout<<"Enter return success number, please."<<std::endl;
  +
std::cin>>success;
 
std::cout<<"C++ code!"<<std::endl;
 
std::cout<<"C++ code!"<<std::endl;
return 0;
+
return success;
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 11:06, 10 August 2015

This page is intended to test Wikia features or the editors.

#include <iostream>

class TestClass {
public:
    int testVar_;
};

int success;

int main()  // "void main" is, and was always, wrong
{
    std::cout<<"Enter return success number, please."<<std::endl;
    std::cin>>success;
    std::cout<<"C++ code!"<<std::endl;
    return success;
}