Search:

Type: Posts; User: voidpain()

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,886

    Thanks! Got sscanf to work

    Thanks! Got sscanf to work
  2. Replies
    5
    Views
    1,886

    strcmp question

    Part of my file:



    int main(void)
    {

    int done = 0;
    char line[300];
  3. Replies
    15
    Views
    1,787

    You were right, that's what was wrong. I am...

    You were right, that's what was wrong. I am going to have to gut a lot of my code because I am making these same mistakes in multiple places. =/

    At the end of your code, what is the getchar();? ...
  4. Replies
    15
    Views
    1,787

    void areaItems (int area, Item *sPtr); //I...

    void areaItems (int area, Item *sPtr); //I declare it

    //...later on

    areaItems(current, startPtr); //I call it

    void areaItems(int area, Item *sPtr)
    {
    printf("%s\n", sPtr->name);
    }
  5. Replies
    15
    Views
    1,787

    Thank you Andrew and quzah (posts 8 and 9),...

    Thank you Andrew and quzah (posts 8 and 9), trying now
  6. Replies
    15
    Views
    1,787

    TheBigH, see post #4. I'm not trying to ...........

    TheBigH, see post #4. I'm not trying to ........ anyone off, haha, I really did get this out of my textbook, and I already said I wasn't going to do this again, not to mention apologizing for it...
  7. Replies
    15
    Views
    1,787

    Yes, someone else mentioned this earlier. I...

    Yes, someone else mentioned this earlier. I actually got this straight out of my textbook. I'd be happy not to do it again, but I've been on the same assignment since I've joined the forum. I'm...
  8. Replies
    15
    Views
    1,787

    Also, my sincere apologies for all the questions...

    Also, my sincere apologies for all the questions as of late (and for those of you who've had to repeat yourself throughout my mistakes). This forum has been the best help I've gotten thus far
  9. Replies
    15
    Views
    1,787

    Problem passing pointer to function

    I am trying to access information within a structure. I am trying to do this by passing a pointer to the structure into a function. The function is declared like so:



    void areaItems(Ptr...
  10. Replies
    7
    Views
    3,592

    Awesome, fscanf() worked nicely, thanks! ...

    Awesome, fscanf() worked nicely, thanks!

    Thanks Andrew, I'm trying the things in your code in a different file right now
  11. Replies
    7
    Views
    3,592

    @Andrew, the typedef pointer is actually coming...

    @Andrew, the typedef pointer is actually coming straight from my textbook (C: How to Program by Deitel). While that does not make this decision any better, I am trying to follow the examples as...
  12. Replies
    7
    Views
    3,592

    Problem reading in Text File

    I am reading in a file and storing its information into this structure:



    typedef struct Item
    {
    char *name;
    int area;
    struct Item *nextPtr;
    } Item;
  13. Replies
    14
    Views
    2,574

    Works perfectly. Exactly what I was looking for....

    Works perfectly. Exactly what I was looking for. Thanks to all!
  14. Replies
    14
    Views
    2,574

    Also, just wanted to mention how bad ass this...

    Also, just wanted to mention how bad ass this forum is. I'm in a summer school class right now, and the school's Help Center has been closed all summer. So far, this forum has been extremely...
  15. Replies
    14
    Views
    2,574

    I actually previously implemented this as char...

    I actually previously implemented this as char zztop[30], and I got it to print just fine within main. But how exactly am I going to pass zztop[30] into the insert function? I can't pass an array...
  16. Replies
    14
    Views
    2,574

    Oh, so does that mean that the string entered...

    Oh, so does that mean that the string entered will be lost and unreachable outside of the main function? How do I avoid this, or how do I allocate memory for this? I can't imagine I'd be using a...
  17. Replies
    14
    Views
    2,574

    The first printf statement inside main seems to...

    The first printf statement inside main seems to work fine. How should I be printing zztop there otherwise?

    I removed the ampersand before value in the second printf statement located in the...
  18. Replies
    14
    Views
    2,574

    Sending String to Function not working

    I am trying to pass a string to this function:



    void insert(ListNodePtr *sPtr, char *value);


    I am gathering the string from scanf, printing it, and then passing it to the function like so...
  19. Replies
    7
    Views
    3,142

    Very helpful, thank you all!

    Very helpful, thank you all!
  20. Replies
    7
    Views
    3,142

    Linked List for items???

    I am currently working on a project that works very much like a text adventure. Each room in the "world" is a structure defined as follows:



    typedef struct Area
    {
    char *name; //name of...
Results 1 to 20 of 20