Several Questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bluesteel
    New Member
    • Mar 2007
    • 84

    #1

    Several Questions

    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<--
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    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.

    Comment

    Working...