Urho3D Wiki
(Created page with "This page is intended to test Wikia features or the editors. <nowiki><syntaxhighlight lang="php"></nowiki> <?php     $v = "string";    // sample initialization ?> html ...")
Tags: apiedit, Visual edit
 
(Moved int success into main function because global variables should be avoided and this usage was bad. Also added using namespace std to shorten code.)
Tags: apiedit, Visual edit
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
This page is intended to test Wikia features or the editors.
 
This page is intended to test Wikia features or the editors.
   
<nowiki><syntaxhighlight lang="php"></nowiki>
+
<syntaxhighlight lang="cpp">
  +
#include <iostream>
<?php
 
  +
    $v = "string";    // sample initialization
 
  +
using namespace std;
?>
 
  +
html text
 
  +
class TestClass
<?
 
  +
{
    echo $v;         // end of php code
 
  +
public:
?>
 
  +
int testVar_;
<nowiki></syntaxhighlight></nowiki>
 
  +
};
  +
  +
int main() // "void main" is, and was always, wrong
  +
{
  +
int success;
  +
cout<<"Enter return success number, please."<<endl;
  +
cin>>success;
  +
cout<<"C++ code!"<<endl;
  +
return success;
  +
}
 
</syntaxhighlight>

Latest revision as of 03:45, 12 August 2015

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

#include <iostream>

using namespace std;

class TestClass
{
public:
    int testVar_;
};

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