How do I effectively add a "\n" to a string without the compiler interpreting it as a new line? For example, if I want to print out the following line:
blahblah\nblahblah
rather than
Type: Posts; User: killiansman
How do I effectively add a "\n" to a string without the compiler interpreting it as a new line? For example, if I want to print out the following line:
blahblah\nblahblah
rather than
the simplest way i can think of to do that would probably be:
FILE *fp;
char string[26]
int i;
fp = fopen("filename","r");
What are the contents of the text file?
I'm having a problem copying structures. As you can see below, MOLECULE contains different types of members, including other structures and strings. I tried making a temporary copy of variable of...
Thanks a lot guys (or girls)... I appreciate it.
I forgot to say that i declared "c" as a type char. What I'm trying to do is determine if the file extension matches the expected one. Therefore, the "[^.]" simply reads up to where it encounters a...
I'm getting a segmentation fault with this piece of code. I pretty sure it has something to do with my use of sscanf(). Any tips would be greatly appreciated.
char c;
.
.
.
.
...
I'm running a loop where I'm trying to find the smallest value in an array. Does anyone know of a way in which I can assign the first value in the first pass to the variable that is supposed to hold...
thanks a lot Salem, that worked.
Once again I would like to appologize for posting that previous mess; hopefully this will be a lot easier to read and understand. The problem that I'm having is that I'm getting the following message...
it should be better now, please help.
im getting the following message: "error for object 0x3fd6a7ef: pointer being reallocated was not allocated". It's got something to do with the way i am allocating memory to the pointer "acceptors."...