Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > A Set of Questi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 9534 of 9592
Post > Topic >>

A Set of Questions About Console I/O and Structures...

by philmasterplus <philmasterplus@[EMAIL PROTECTED] > Apr 23, 2008 at 01:16 PM

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! ]




 3 Posts in Topic:
A Set of Questions About Console I/O and Structures...
philmasterplus <philma  2008-04-23 13:16:29 
Re: A Set of Questions About Console I/O and Structures...
Christopher <cpisz@[EM  2008-04-24 01:07:29 
Re: A Set of Questions About Console I/O and Structures...
Carl Barron <cbarron41  2008-04-24 01:08:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 2:28:36 CDT 2008.