Check out example codes for "spicoli". It will help you in understanding the concepts better.

Code Example 1

while(true){
cout<<"GNARLY!"<<endl;
} //obviously not solving a real problem, just a big spicoli fan here :)

Learn ReactJs, React Native from akashmittal.com