hay was wondering what VOID does?
im really new to this and i cannot find the answer anywhere.
if i find any more simple questions like this ill reaply to this.
thank you!
Printable View
hay was wondering what VOID does?
im really new to this and i cannot find the answer anywhere.
if i find any more simple questions like this ill reaply to this.
thank you!
Read this FAQ
thx alot :) been wondering what it was for a long time!
how would i execute only one block of code if a veriable equals a spacific number?
You should take a look at this tutorial
There are many useful things on this websites homepage.
ok so if i input script in the braces right after the if statement and such it will run the skript? ill try that and ill probly do it wrong lol
Ok, if statements are used to executed sections of code based on whether a condition is evaluated as true or false. You use these as tools to help control the flow of a program. A very basic example of this is below. Note that the cout's are executed based on what input the user provided. The tutorial covers all of this, let me know if you need more help.
Code:#include <iostream>
using namespace std;
int main() {
int x;
cout << "Enter either 1 or 2: ";
cin >> x;
if(x == 1){
cout << "This is only executed if x = 1";
}
if(x == 2){
cout << "This is only executed if x = 2";
}
cin.get();
cin.get();
return 0;
}