Whats the difference between cout and std::cout?
Hey, I'm making a program, and I want it to be as neat as possible. And I was wondering if there really was a difference between using std:cout<<""; rather than just using cout<<"";. I'm making an RPG, which I'm making for learning purposes.
Also, I'm new to this, and I've read the tutorials, and I've come to find the explanations of pointers is very confusing. And its used in ways later on in the cprogramming.com tutorials in ways that it had'nt explained before. I'm aiming for a book soon, but for now im going to use this. Please explain pointers.
And to make life easier for me and possibly for others, i was wondering how I could make a function to make colors easier to call.
This is what I have so far:
Thats only an example of how i'm thinking the program up. This is very mind boggling. How would I design a short function to make such a complex funtion complete? I could make an if statement for EVERY SINGLE variation, but that would be more work than needs to be put into it. I've thought of making it so that if its true, define a variable to be the FOREGROUND_COLOR part of the color definition, but how would I do that? I've tried just putting the variable into the color call:
int txtclr(int clr0, int clr1, int clr2, int drk)
When I do this I get an error, how would I implement this? I'm going to just use and if statement to see which colors are being used, but that would mean doing EVERY SINGLE variation, so it would be more work than just doing EVERY SINGLE variation of the color call. The program i'm making will use colors often, so I want to make this easier on me. Maybe if someone has a script which does this, or can help me develop this function we can have it as a resource for those who don't want to define the color with all the code it requires.
If someone has a solution, thanks alot.
Thanks in Advanced,
Whew that was alot of typing.
What about the last bit I talked about?
About the colors, and how to use variables to hold commands or conditions?
Sorry, I forgot to thank you for the bit of code you gave me, thanks.