| CODE |
#include <iostream> using namespace std; char smiley() /* these make custom functions for our next process */ { return 1; } char smiley2() { return 2; } char heart() { return 3; } char diamond() { return 4; } char clubs() { return 5; } char spade() { return 6; } char somethin() { return 20; } char somethin2() { return 19; } char arrows() { return 18; } char triangle() { return 17; } char right() { return 16; } char sun() { return 15; } char musical() { return 14; } char female() { return 12; } char male() { return 11; } char some() { return 9; } char sos() { return 21; } char block() { return 22; } char arrowz() { return 23; } char up() { return 24; } char down() { return 25; } char pictures() /* a custom function which uses custom functions from previous coding */ { cout<<smiley()<<" smiley face 1 "<<smiley2()<<" smiley face 2"<<"\n"; /*remember writing these function names? heres a bit on how to use them*/ cout<<heart()<<" a heart "<<diamond()<<" a diamond"<<"\n"; cout<<clubs()<<" suit of clubs "<<spade()<<" suit of spades"<<"\n"; cout<<somethin()<<" i dunno "<<somethin2()<<" two exclamation points"<<"\n"; cout<<arrows()<<" arrow thingie "<<triangle()<<" left pointing triangle"<<"\n"; cout<<sun()<<" sun? "<<right()<<" right pointing triangle"<<"\n"; cout<<musical()<<" musical note "<<female()<<" female symbol"<<"\n"; cout<<male()<<" male symbol "<<sos()<<" i dunno"<<"\n"; cout<<up()<<" up arrow "<<down()<<" down arrow"<<"\n"; cout<<"\n"<<"\n"; return 0; } int main() /*program STARTS executing here */ { cout<<"some things you can \"draw\" with c++:"<<"\n"<<"\n"; cout<<pictures()<<"\n"<<"\n"; /* outputs the custom function "pictures" to the screen, and makes a blank line afer it*/ cout<<"there are probley more i dident figure out."<<"\n"; system("PAUSE"); } /* well thats the basics of making your own custom functions, i know theres more to makeing more advanced functions, but i accidently found out those c++ "pictures so i figured i would show you how to make them, and while im at it teach you something more usefull too :) */ |
| CODE |
| #include <iostream> using namespace std; int main() { for(int i=0;i<256;i++) { cout<<(char)i<<endl; }; system("PAUSE"); } |