No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello, I am having trouble with a simple math operation after reading from a file. If a particular condition is met, i am copying a number(7 positions), starting from position 31. My aim is to sum all these numbers when the condition is met. I am testing the code on … |
|
I have a code which throws "segmentation fault" after some computation. I was looking for some help with efficient memory management. My program does the following: I have a grid with min. i,j,k coordinates -52, -34, -35 and max. i,j,k coordinates 53, 37, 33. (In i, j, k loop). I … |
|
I have a codein which i want to do the following: main(int argc, char *argv[]) { fp1=fopen(argv[1], "w") function(para1, para2, ??) } function(para1, para2, ??) { fp2= fopen(argv[2], "r") } So eesentially i want to pass a few parameters and the pointer to the function. I dont know how to … |
|
Hi, I have written a program that copies one file to another while making format changes to some lines The relevant part of the code is the following" [code] while(fgets (cbuff, 80, f1)!= NULL) { if ( (isdigit(cbuff[5])) && (isdigit(cbuff[11])) && (isdigit(cbuff[17])) ) { strncpy (c1, cbuff+1, 5); c1[5] = … |
|
Hi, I want to write a program to split one file into multiple files. At any line that contains: "# Name:" i start writing to a new file. My problem is that i want to save each file with a name i extract from the same line. Example: # Name: … |