Did what you said and no luck.
Type: Posts; User: nizbit
Did what you said and no luck.
Have to use tmpnam.
This program will generate a list of temporary filenames using linked lists.I dont get an error when I compile, but when I execute it just hangs. This is my code:
#include <stdio.h>
#include...
I stepped a way for while and then it hit me like a ton of brick as what you were saying about the data ending with a '\n'. I thank you for your patience and help.
Adding *x = '\0'; coredumps. The last field ends with '\n' doesn't explain why s->curr is not getting its data.
My latest code, which I don't think has changed from the first post:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main () {
struct stuinfo {
I add the *x = '\0'; before the strcpy and I get a coredump.
I'm willing to bet everyone is sick of me :D . Data is missing or being passed over for the variable s->curr. I'm sending all the data to an output file and don't see s->curr being printed. I'm...
I got the code working but I'm missing the curr value. Its missing from the output file.
I modified my code to what you suggested and my output file looks like this:
0 - 0- 0 0
0 - 0- 0 0
0 - 0- 0 0
0 - 0- 0 0
0 - 0- 0 0
I'm sure its a problem of where the statement are located in my while loop, but all that gets inputted in my ouput file is the persons ssn. Now the ssn is on the line it should be. The input...
Cool, thanks!!!
I understand that but I need to put "slappy" in about 30 spaces to the left of the margin of the file that fp points to.
With fputs, is there a way to adjust where its puts the data? I need to put data in a column in another file.
Thanks!
When I look at my output file to my program the ssn has the first 3 numbers printed, then the whole social printed after it so it looks like:
234-24367-8765
I can't see where I went wrong. ...
Or troll around 323 threads for 2 hours when someone has exactly what I needed- go figure ;) . Thanks for your help eveyone!
I'm aware of keyword searches. I just figured someone(thanks sand_man!!) had a quick link.
Hmmm, strtok(). Unaware of that function. Anyone might have an example on how its used?
I have a file that we are supposed to use as input. It looks like this:
name:curriculum:gradyear:ssn:dob
I'm going to read it in a buffer, but trying to find the logic to seperate the...
Cool thanks!
Ok made a booboo with EOF. It can't look for EOF in data. Thats big faq to memorize everything, but thanks for showing me. The only prolem I have left is when I do:
[academ] $ wc d5.dat
...
Ok I figured out what I needed to do, but I get a coredump when I run in UNIX. In Windows, under bloodshed, the executable runs fine. I think the character count is off, but that shouldn't cause a...
Ok I see what your saying.
The contents of d5.dat:
Isn't counting lines fun....
You should
see some interesting results.