Search:

Type: Posts; User: Khaltazar

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    1,925

    Thank you ZuK. That did work. I have another...

    Thank you ZuK. That did work. I have another question in case you or someone else comes here. Would the following sample code be valid?


    int a = -2147483648u;
    printf("int [Minimum]: %d", a);

    ...
  2. Replies
    5
    Views
    1,925

    Data Type Range

    I have seen that unsigned int ranges from 0 to 4,294,967,295. I cannot print this to the user without a warning though. I'm just trying to understand the limits of variables, so this is just for my...
  3. Replies
    4
    Views
    897

    That's why I was confused. I figured it out by...

    That's why I was confused. I figured it out by changing


    A.set_name("First Last"), index);

    to


    c.set_name("First Last"), index);
  4. Replies
    4
    Views
    897

    Class Inheritance

    Attention: I figured it out. I forgot to change A to be c instead when I was messing around with my classes.

    I'm trying to figure out how to link classes by inheritance but I keep getting an...
  5. Replies
    5
    Views
    966

    When I try to convert the string Name; to...

    When I try to convert the


    string Name;

    to


    string Name[10];
  6. Replies
    5
    Views
    966

    Small Class Example

    Does anyone know why this will not display the name to the console? If I call A.getName(); in the addContact function itself it will retrieve the name correctly, however I believe it deletes itself...
  7. Replies
    6
    Views
    1,685

    I didn't mean it was better than the poster above...

    I didn't mean it was better than the poster above me, I was replying to the original poster. I usually don't use quotes unless I am replying to someone other than the original poster.
  8. Replies
    6
    Views
    1,685

    A better example would be the following: By...

    A better example would be the following:

    By better I am not saying better than Click_here's example, I am referring to the original poster's example.



    #include <stdio.h>

    int main(){
    ...
  9. Replies
    8
    Views
    1,137

    Could you show how that works? I have an idea,...

    Could you show how that works? I have an idea, but I don't know if it would work with structures. Here is my guess:


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

    #define CONTACTS 50

    typedef...
  10. Replies
    8
    Views
    1,137

    This is the correct use of realloc(), right?...

    This is the correct use of realloc(), right? Thank you in advanced.

    If there is a better way than declaring j, please let me know.


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

    #define CONTACTS...
  11. Replies
    8
    Views
    1,137

    Thank you everyone for your help. I changed my...

    Thank you everyone for your help. I changed my code to the following:


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

    #define CONTACTS 50

    typedef struct {
    char name[20];
  12. Replies
    8
    Views
    1,137

    malloc(), realloc(), and free()

    The code below will compile just fine, I'm curious about some parts though.

    1. About 50% of the time it will crash and give me the following error:


    Process terminated with status -1073741819...
Results 1 to 12 of 12