Created
April 13, 2013 16:37
-
-
Save ereidland/5379115 to your computer and use it in GitHub Desktop.
Reference at Library.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Format for functions: | |
//type name (arguments) | |
//{} | |
char * myFunction (int lol) | |
{ | |
//Variables: | |
//type name; | |
char * myArray; | |
//Initializing to new array: | |
//(Type excludes asterisk.) | |
//name = new type [size]; | |
myArray = new char [100]; | |
//For declaring a fixed size array: | |
//type name [size]; | |
//Size must be a constant integer, and constants must be defined at the start of the program. | |
char myFixedSizeArray[100]; | |
//Note that all arrays are pointers. | |
//Format: return data. | |
return myArray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment