Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
array input problem in c++
Name: one1082 Date: November 7, 2003 at 10:58:55 Pacific OS: win xp CPU/Ram: p3 700
Comment:
I'm kicking myself because this isn't working. Basically, I need to read a bunch of numbers from an input file to an array and sort them. My problem is, I'm supposed to stop at the end of the line, sort that array, then read another line, sort that, and so on. I'm having trouble getting the loop to stop inputing at the end of the line. Using chars, I can get it to recognize the end of line character ('\n'), but using integers this doesn't work. Any ideas?
Name: borelli35 Date: November 7, 2003 at 12:44:26 Pacific
Reply:
With those kind of specifications it almost sounds like a homework assignment. Post the code you have written in your attempts so that we can see what you have done and specify where it is that you are currently stuck at.
borelli35
0
Response Number 2
Name: Ronin1 Date: November 8, 2003 at 09:57:24 Pacific
Reply:
What sort of loop are you using? Something like this *should* work. ch is an integer.
Summary: hi all, can any body solve this problem, using c as the programming language.Really urjent... 1.->Your program should: Create a binary tree structure. Create routines for loading the tree appropriate...
Summary: How do you allocate more memory for a pointer in straight C? in C++ it would look like this: char *string; string = new char[11]; string = "hello world"; What I need to do is create and array of stri...
Summary: > How can i solve the following series in 'C'- 1+1/22+1/32+......+1/n2. First, you input n from the user. scanf would probably work. Then, you start your result with 1. Then, you enter a loop that ...