It depends on how you're reading the records. The easiest way is to treat each record as a line and use getline to read them. getline will extract the newline character for you. If you're reading character by character then you may need to use the ignore member function of your stream:
cin.get ( ch ); // Get a single character
cin.ignore(); // Discard the next character
>Actually, code is in "C" but compiled in a C++ compiler.
C++ compilers can compile C. If you're compiling C as C++ then you'll get burned by the differences between the languages.
>The fgets command I was trying didn't work.
I despise that. Everyone comes here and says "it doesn't work". I've got news for you bucko, "it doesn't work" is NOT HELPFUL! You tell me how it doesn't work and I'll tell you why it doesn't work.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...