Here goes my list of questions that have been bugging me for a couple
of days.
1. It seems that console I/O with "cout <<" and "cin >>" results in a
bloated executable, whereas I/O functions from C such as printf() and
scanf() make smaller, faster programs. Are there any other C/C++
console I/O functions available, and which of them are fastest? Also,
do you think I should stick to cin and cout when regarding speed,
portability and the C++ philosophy?
2. I am using conio2.h from http://conio.sourceforge.net/
in my Visual
C++ 2008 projects to create a 16-color text user interface. Is there a
portable (for Windows, Linux, and Mac) alternative to conio2? I’d like
to have all functionality that conio2 provides. (The conio2 site
provides documentation.)
3. (If there is no suitable alternative to conio2) Microsoft Visual C+
+ Express 2008 seems to have a problem with structures. It gives a
syntax error with the following code:
someFunction(var1, var2, (COORD) {myInt1, myInt2});
And this one:
COORD cTemp = {0, 0};
To fix these issues (which came from the conio2 library mentioned
above), I have substituted the above to the below:
COORD cTemp; //Temporary measure for VCX 2008
cTemp.X = myInt1;
cTemp.Y = myInt2;
someFunction(var1, var2, cTemp);
Is there a way to eliminate the error without using temporary
variables?
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|