Search:

Type: Posts; User: breanne

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    6,403

    uh...

    sorry, no need to download:



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    #include "student.h"
  2. Replies
    7
    Views
    6,403

    help

    okay, can someone tell me why my code doesn't write more than one record to the file??? it'll write one okay, but if i want more than one, then it chokes and prints a whole bunch of crap to the...
  3. Replies
    7
    Views
    6,403

    the complication arises when i try to split the...

    the complication arises when i try to split the main function into two separate functions (readfile and writefile)...but those are minor bugs....i've just gotta format the user interface better....
    ...
  4. Replies
    7
    Views
    6,403

    easier this way

    i think that it would be easier if i stated my desired outcome, cause im turning into a real grouch trying to figure out these bugs.

    I have an array of students:

    struct student
    {
    char...
  5. Replies
    7
    Views
    6,403

    linked lists maybe???

    why would calling fscanf return a segmentation fault???

    i also got an error that said "bus error"...i've never seen that before, can anyone explain?
  6. Replies
    4
    Views
    1,018

    aaaahhhh

    wonderful::: hammer's input is the kind that i find the most...hmm...enjoyable: lots and lots of info.
  7. Replies
    4
    Views
    1,018

    best choice for input???

    I've been reading a lot of posts concering the use of gets, fgets, scanf, getchar....all discussing the issue of portability. while scanf is the easier choice to use (for those who are lazy), why...
  8. Replies
    8
    Views
    2,714

    spoke too soon...

    i figured it out...i needed to use a FILE pointer for the third argument of fgets...jeez, i was stuck on that for the longest time....ugh.....


    doomo
  9. Replies
    8
    Views
    2,714

    another fgets question, this line of code chokes...

    another fgets question, this line of code chokes when i use it:

    >fgets(sarray[index].name, 25, fname);

    at this point: index=0, sarray is a name of students, name is a character array in the...
  10. Replies
    8
    Views
    2,714

    thanks for the fgetc, but i was looking for...

    thanks for the fgetc, but i was looking for something that did the work for me (of course, i am extremely lazy)...but i will be forced to deal with my own coding inadequacies....

    as for the malloc...
  11. Replies
    8
    Views
    2,714

    delimiter-terminated getline?

    i have two problems actually:

    1) in c++, you can use the 'getline' function to read in a line that is terminated with a specified delimiter..is this at all possible in c? I am assuming that i'd...
  12. Replies
    4
    Views
    944

    hmm

    so, i actually want to be using a fstream...like this:

    //code
    fstream myfile;
    myfile=open("myfile.txt");
    //

    will this create the file if that file is not found?
  13. Replies
    4
    Views
    944

    also...

    the thing that's kind of messing me up is that i have file being opened and read by the constructor in one class, and then being written to by the deconstructor in that same class...so i dont think...
  14. Replies
    4
    Views
    944

    file i/o and classes

    i have a program that it a little wacked (cause i suck at programming)...anyway, i need some clarification on input and output to/from a file.

    if you declare:
    //code
    fstream myfile;...
  15. Replies
    2
    Views
    975

    oh my.

    oh my, that error disappearing was the best rabbit that a magician could pull out of their hat....

    ...thank you so very much...i will a wonderful two hours of sleep tonight...if i can get the rest...
  16. Replies
    2
    Views
    975

    linked list error

    i have a defined a struct that looks like this:

    //code:
    struct record
    {
    char name[25];
    char address[80];
    int yearofbirth;
    char telno[15];
    };
  17. Replies
    15
    Views
    1,784

    wonderful...

    i figured it all out, use getline...ah, i should listen when other people speak, on top of thinking before i speak....

    "what a wonderful world it would be"...if i only i could practice what i...
  18. Replies
    15
    Views
    1,784

    instructors now days...

    the complicated stuff, i have a minority kind of understanding on...like the concept of a linked list...of course, it would be the implementation of such that's got me pulling my hair....

    the...
  19. Replies
    15
    Views
    1,784

    well

    of course, i am programming for a class that finishes in hmm....about 38 hours now, during which time i need to finish one project and begin(as well as complete) four assignments.

    i am...
  20. Replies
    15
    Views
    1,784

    no no, i recant.

    "i should learn to think before speaking"

    okay, i think i got somewhere. i wouldn't be able to format something around the null-termination, because i press <enter> on every line, which is what...
  21. Replies
    15
    Views
    1,784

    hmm, not there yet.

    i got the strcat, but to make life even more exciting, let's say that i dont know how the user will choose to input the information.

    john smith
    123 green way
    nowhere, usa 12345

    or

    john...
  22. Replies
    15
    Views
    1,784

    a little more involved question

    let's say that i wanted to take user input, that was on separate lines, and wanted to store that input in a single array. how could that be done?

    for example, i have a mailing address that i...
  23. Thread: quick file i/o

    by breanne
    Replies
    4
    Views
    2,048

    oh my

    thats how bad this is, i didnt even realize that i didnt post it in the c++ board.
  24. Thread: quick file i/o

    by breanne
    Replies
    4
    Views
    2,048

    quick file i/o

    okay, so i procrastinate, and have no idea how to do any kind of file i/o in C++. can anyone give me the "cut-to-the-chase" version of low level file i/o???

    all i really want to do is take user...
  25. Replies
    11
    Views
    1,192

    oh my.

    Gods you two are, Gods i tell you.

    doomo very much, now i can take a nice refreshing shower and take my eyes off the screen for a second or three.
Results 1 to 25 of 28
Page 1 of 2 1 2