These are just some of the more useful #define statements I've used in C++. These are some of the statements you'll use the most (in the case of template<typename T> when you use it, you use it a lot!). So I figured I'd post it for others, even though a lot of the programmers probably already have this list.
Useful #define Statements
Lucaci Andrew
commented:
-1
#define out cout<<
#define in cin>>
#define n "\n"
#define nn "\n\n"
#define type template<typename T>
#define sp system("pause");
#define f_loop_l for (int i = 0; i < x; i++) // Replace 0 and/or x with a specific number
#define f_loop_g for (int i = 0; i > x; i++) // Replace 0 and/or x with a specific number
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
sepp2k
378
Practically a Master Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
micwide
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
NathanOliver
commented:
My boss would kill me if he saw this
+9
major_tom3
commented:
The finest bit of satire I have seen on a C++ thread. Made my day!
+0
Satyrn
commented:
ahh crafty. I love this idea but I would hate reviewing code that did this ><. This isn't Python!
+0
Labdabeta
182
Posting Pro in Training
Featured Poster
ravenous
266
Posting Pro in Training
moxy
0
Newbie Poster
sepp2k
378
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.