Search:

Type: Posts; User: Yinyang107

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    2,244

    How would I do it without strncat? X += y[i] or...

    How would I do it without strncat? X += y[i] or something?

    I need to do it in a loop because it checks if each stage is valid. For instance, where Y = 802143735:


    X=8
    valid? no
    X=80
    valid?...
  2. Replies
    5
    Views
    2,244

    Oh yeah, good point.

    Oh yeah, good point.
  3. Replies
    5
    Views
    2,244

    Appending char to C-Style string

    I need to append one character from C-style String X (not necessarily the first char) to C-Style String Y. I was thinking of doing it thusly (this is in a for loop):


    strncat(X, Y[i], 1)

    where...
  4. Replies
    4
    Views
    27,082

    Woops, I read 'ISBNPrefix" but didn't think to...

    Woops, I read 'ISBNPrefix" but didn't think to check whether it was the .h or .cpp; the line I gave before was wrong, then.

    ISBNPrefix.h is short, minus comments, so I'll post the whole thing.
    ...
  5. Replies
    4
    Views
    27,082

    I have #include #include...

    I have
    #include<iostream>
    #include<cstring>
    #include<cstdlib>
    #include<stdio.h>
    included on one .cpp, and
    #include<string.h>
    #include<cstring>
    #include<iostream>
    #include<cstdlib>
  6. Replies
    4
    Views
    27,082

    " 'FILE' not declared in this scope"

    I'm getting the error " 'FILE' not declared in this scope" many times while compiling my program, as well as " 'FILE' does not name a type" twice. I think one may be a product of the other.
    ...
  7. Only two, both looking for integers, though I do...

    Only two, both looking for integers, though I do have fscanfs.
  8. Thanks ever so, tabstop.

    Thanks ever so, tabstop.
  9. That's what I tried before; it ends up making it...

    That's what I tried before; it ends up making it worse. Specifically, with the extra line of code, it never accepts my input at all.
  10. I've a problem. Obviously, else I wouldn't be here.

    I have this function, which is meant to get a user's input, validate, and translate it to an integer:

    int menu(){
    int rv = 0;
    char in;
    do{

    //Display...
  11. Replies
    4
    Views
    1,395

    Argh, again with the single-character mistakes...

    Argh, again with the single-character mistakes >.< Thanks guys.
    And no, my compiler didn't say anything.
  12. Replies
    4
    Views
    1,395

    Segfaulting - don't know why

    The program's supposed to check if the entered string has embedded spaces (FYI, by the prof's definition, "Te xt" has embedded spaces, while " text" and "text " do not, hence the extra bits of code)....
  13. Thanks, Adak. I knew it would be something silly...

    Thanks, Adak. I knew it would be something silly like that.
  14. Can't figure out what's wrong with this simple function

    It's for a school assignment. I have no clue what's going on, but it prints "1077936128" for friends_helped and "0" for coins_earned, despite the fact that the vars being received are 1 and 27,...
Results 1 to 14 of 14