By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,852 Members | 2,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,852 IT Pros & Developers. It's quick & easy.

Several Questions

P: 84
Hi guys, I am currently creating a program in which i need several questions to be answered.
1- I need to use clrscr() under dev c++ 4.992 but i can't get this working! The header "conio.h" doesn't have such function and "conio" is nonexistant. If anyone knows how to solve this...
2- I have heard about text color. Can anyone tell me how to use cprintf??
3- I need to store the content shown in the console to an array, any idea??
4- When I want the user to type in a number, if a letter is pressed the program gets stuck. I am using scanf for this.
5- Can anyone tell me how to save the date to an array??
6- I need to make an integer into an integer array. For example: I have 1665, i want to make an array like this: array[]={1,6,6,5}. These numbers will not be necessarily be 1665, they may vary so it can't be a fixed thing, i must create a function able to split the number. Any ideas????

-->Any help is really appreciated<--
Mar 13 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,652
1) Make sure you have conio properly set up and installed. You may also have to create a project for conio to work properly.

3) It depends on how the data is displayed. What sort of data will you be getting? How is it put into the console?

4) I remember hearing that scanf returns an integer indicating how many items were properly scanned. If this result is less than the number of arguments you ask for, then there was an error and you should try again.

6) For this, you will have to use division and modulus division. Can you think of how? Hint: think base 10.
Mar 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.