So you want to read in 50000x14 values and add a constant value to them? What do you want to do with them after that? I presume that you don't want to just print them to the console?
Do you have any more detailed example of the actual code that … Read More
OK, just to mention before getting to the actual problem, there are a number of likely problems in the first few lines:
using namespace std;
[*]You probably don't need [icode]#include <stdio.h>[/icode], … Read More
[CODE]int i = 0;
for(int j=0; j<=count; j++)
data14[count] = data[j][i] + 2;
cout << data14[count] << "" << endl;
With this code i getch the column 14 of my 2d array and sum 2 in each value.Gerating another array … Read More
OK, so my understanding is that you want to do the following:
[*]Read in the data, which has 14 columns and some (large) number of rows.
[*]Take column 14 and add 2 to all the values.
[*]Allow the user to select one of the rows to print to file/console/another … Read More
[QUOTE=jshoot;1461984]I don't wanna to look that I'm asking to you do all the job, but you can put all that codes you pass together to make run?[/QUOTE]
Sorry, can't do that. I don't have a working program anyway, I just typed the parts on the post straight into Daniweb.
There's … Read More
(Then it make the error message) "Error, unable to find scan .exiting."
So, if you look at the line of code that generates this message:
std::cerr << "Error, unable to find scan " << targetScanNumber << ". Exiting." << std::endl;
If everything was working correctly, and … Read More
[QUOTE=jshoot;1462078]about that book, you have any file of then? because i'm brazilian guy, and buy they is hard![/QUOTE]
That was just an example. There are many good books on C++. Best to find one that is available locally, or from an onlie seller that covers your region. Read More
[QUOTE=jshoot;1462875]i have to "jump" the #S and go to the next position, that will be (0,3), ok? But how i do this?[/QUOTE]
There are two ways, you could just repeat the stream extraction line:
h >> currentScanNumber; // Gets the "#S" part that we don't … Read More
[QUOTE=jshoot;1462906]ok, but the stringstream is not working, since i print "h" and gave = "0x22.."[/QUOTE]
If you have
std::cout << h << std::endl;
then you will get something that looks like [icode]0xbfb9a454[/icode] or some other number, this is the memory address of the string stream. You can't really … Read More
[QUOTE=jshoot;1463649]then make the stringstream, but don't work[/QUOTE]
What doesn't work? How?
[*]if it's a compiling problem: post the errors and the part of the code that the errors refer to
[*]if it's a run-time problem, print out the values of things until you can find what is going … Read More