Search:

Type: Posts; User: CeeCee

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. if(isspace(cin.get(c))){ count++; }...

    if(isspace(cin.get(c))){
    count++;
    }
    if(count == 2){
    c = toupper(cin.get(c));
    count = 0;
    }
  2. >>No strings or arrays used in this program, only...

    >>No strings or arrays used in this program, only char.
    Then it can't be done. You need to put the line in an array and go through it reading spaces until you read two and then the next character...
  3. Replies
    7
    Views
    4,026

    So that would be a no? Because I was using the...

    So that would be a no? Because I was using the same technique that another program I found while surfing used and it worked great. I don't understand why


    struct _FuncInfo
    { char name[20],
    ...
  4. Replies
    7
    Views
    4,026

    fread is reading too much

    Everyone says that you can use fread to input a structure, right? For some reason this code doesn't work and I can't figure out what I'm doing wrong.


    #include <stdio.h>
    #include <string.h>
    ...
  5. Replies
    4
    Views
    1,075

    I understand now, thank you. Here is the fixed...

    I understand now, thank you. Here is the fixed function, it works just fine now.


    #ifdef DEBUG
    void encrypt(char *message)
    {
    char *p = message;

    assert(p != NULL);
    while(*p...
  6. Replies
    4
    Views
    1,075

    How can I get the first function to work?

    How can I get the first function to work?
  7. Replies
    4
    Views
    1,075

    Array or Pointer?

    Here's a funny problem. I want to take a string and encrypt it, which works fine when I treat the string that is passed to my function as an array, but when I treat it as a pointer it encrypts the...
  8. Replies
    1
    Views
    825

    Pointers to pointers

    What are they really good for? In every case of pointers that I've seen, just one pointer would work fine yet the programmer chose a pointer to a pointer. Why would I want to use that instead of just...
  9. Replies
    7
    Views
    1,825

    Sorensen: Thank you, but isn't your loop the...

    Sorensen:
    Thank you, but isn't your loop the same as mine in functionality except for which pointer it frees? If there's a favorable difference I'll start doing it that way.

    Imperito:
    I wasn't...
  10. Replies
    7
    Views
    1,825

    Good idea, so I can make a 50000 node list and...

    Good idea, so I can make a 50000 node list and use a recursive function to free it all. I'm sure recursion is okay for small lists, but my question has nothing to do with the actual method of freeing...
  11. Replies
    7
    Views
    1,825

    Freeing a linked list

    This is a very specific and detailed question, but at the end of this free method will my pAhead pointer need to be deleted since it should point to NULL?


    pList = pHead;
    NODE * pAhead =...
  12. Replies
    3
    Views
    1,343

    That worked great, but when I transferred the...

    That worked great, but when I transferred the list to my program I get an access violation error when I run it. I went through the program step by step with the debugger and everything seems fine.
    ...
  13. Replies
    5
    Views
    2,308

    After you delete a pointer it's gone, you can't...

    After you delete a pointer it's gone, you can't use it anymore. However, if you intend to use it again then you can set it to NULL when you've finished with it's original value so that you don't...
  14. Replies
    3
    Views
    1,343

    Linked list problem

    I don't see what the problem is, when I try to print out the list it just prints the last string entered equal to how many nodes there are. I know it's something simple, but I just can't see it.

    ...
  15. Replies
    3
    Views
    1,570

    I tried using allegro_s.lib and that didn't work,...

    I tried using allegro_s.lib and that didn't work, but putting the DLL in my windows directory did the trick. Now I need to learn how to use allegro :)

    Do you know of any good basic tutorials on...
  16. Replies
    3
    Views
    1,570

    Problem with Allegro

    I downloaded and installed everything, but now I get an error message when I try to link my program. Otherwise the program compiles fine.
    The first is: "A required .DLL file, ALLEG.DLL, was not...
  17. Replies
    5
    Views
    1,270

    There doesn't seem to be a CRT directory, and any...

    There doesn't seem to be a CRT directory, and any CRT files are encrypted
  18. Replies
    5
    Views
    1,270

    MSVC++ 6

    MSVC++ 6
  19. Replies
    8
    Views
    1,677

    >if(isdigit(department)) Looks good to me ...

    >if(isdigit(department))
    Looks good to me

    >if(department<1 || department>9)
    That should be if(department<'0' || department>'9')
    but another way would be if(!isdigit(department))
    or just use...
  20. Replies
    1
    Views
    1,985

    I'm not sure if this will help, but I looked on...

    I'm not sure if this will help, but I looked on google and found this.
  21. Replies
    7
    Views
    1,216

    Post some more of your code and what the desired...

    Post some more of your code and what the desired output is as well as the actual output. What you have now isn't enough to know what's wrong.
  22. Replies
    5
    Views
    1,270

    Standard C++ classes

    Is there a way that I can look at the source code for the standard C++ classes? When I look in the header files like iostream.h all I see are declarations, but no implementation.
  23. Replies
    7
    Views
    1,203

    At current I'm storing the data in three...

    At current I'm storing the data in three different classes, one for employess, one for customers, and one for inventory. The two classes for employees and customers are derived from an abstract...
  24. Replies
    7
    Views
    1,203

    So I should create a generic binary tree class...

    So I should create a generic binary tree class and three linked lists, one for each data category. Then I instance the binary tree class and pass it a pointer to each node of one of the linked lists....
  25. Replies
    3
    Views
    1,856

    FOR is a loop, it just looks different than a...

    FOR is a loop, it just looks different than a while, these two loops are equivalent.


    // a for loop
    for(int i=0; i<10; i++){
    cout << i << endl;
    }

    // a while loop
    int i = 0;
Results 1 to 25 of 46
Page 1 of 2 1 2