Search:

Type: Posts; User: theweirdo

Search: Search took 0.01 seconds.

  1. Thread: ios::cur

    by theweirdo
    Replies
    3
    Views
    9,831

    No, I put in a cout

    No, I put in a cout << tellg() and that keeps increasing by one, but it never stops.. why?
  2. Thread: ios::cur

    by theweirdo
    Replies
    3
    Views
    9,831

    ios::cur

    How come infile.eof() is never true in this example? I am stuck in an infinite loop... but I know that the size of input.txt is only 100bytes.




    ifstream infile("input.txt", ios::in);
    while...
  3. Replies
    5
    Views
    5,953

    Is there a way to use that function on two...

    Is there a way to use that function on two different fields (with same data type, ie: int)? I don't want to rewrite a function that looks almost exactly the same for each field that I have.
  4. Replies
    5
    Views
    5,953

    qsort and structures

    If I have a structure with two different datatypes as fields of the structure, ie:


    typedef struct {
    int value;
    char *name;
    } item;


    Now I have an array of these items and I want to sort...
  5. Replies
    4
    Views
    1,377

    Call-by-reference

    If I have a simple program like this:


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

    void change (char *t);

    int main (void)
    {
  6. Replies
    1
    Views
    1,345

    argument passing

    Again, another simple question:

    If I have a function header:

    void foo (char *s, char **s2)

    Can I call the function like this:

    char *string1;
    char *string2[10];
  7. Replies
    3
    Views
    894

    Yes, that is exactly what I need, thanks so much.

    Yes, that is exactly what I need, thanks so much.
  8. Replies
    3
    Views
    894

    character pointer clarification

    Hi! If I make a pointer to an array of characters like this:

    char *text[50];

    Will that be a pointer to a string that is 49 characters long? I want to make a list of words, where each word is at...
  9. Replies
    7
    Views
    7,301

    I believe it's some sort of streaming data. I...

    I believe it's some sort of streaming data. I need to manipulate the original file using some unix utilities and without using any temp files, put the manipulated data into my C program.
  10. Replies
    7
    Views
    7,301

    I don't believe I know how to use a buffer, I...

    I don't believe I know how to use a buffer, I haven't programmed in a year so I'm pretty rusty. Is a dynamic array just a pointer of some sort?

    Once I have the input (which is most likely a novel...
  11. Replies
    7
    Views
    7,301

    Well the method of saving the input cannot...

    Well the method of saving the input cannot change. I am piping the input in from UNIX... And the input will be a large number of words, each seperated by '\n'.

    Is there another possible function I...
  12. Replies
    7
    Views
    7,301

    simple fgets question

    Hiya, I was wondering if anyone could help me with a simple question on fgets().

    I'm reading in an unknown number of characters into a char pointer using fgets... Now the arguments for fgets are...
Results 1 to 12 of 12