Search:

Type: Posts; User: topten2016

Search: Search took 0.01 seconds.

  1. Is this correct way for operator reloading?

    Hello. I am learning operators overloading
    I tried to overload operator "="
    The code is working correct for me, but I wonder, is it a correct way of operator overloading?



    Class Massif
    {...
  2. Replies
    3
    Views
    356

    Thank you very much, Matticus I wonder, say, I...

    Thank you very much, Matticus

    I wonder, say, I have this situation



    char ch[250];
    char *ch2 = ch;
    int z = "2";
    int *z2;
  3. Replies
    3
    Views
    356

    pinters to char?

    Hello. I am learning pointers, but can't find a good practical example for using pointers with char.
    My question in paticular is:
    Is this a correct way of declaring pointer to char ch[250]?

    ...
  4. Replies
    11
    Views
    748

    Thank you very much, people for your support. As...

    Thank you very much, people for your support. As a result, I started to understand better pointers.
    @Salem Could you please advise, what should I use better instead of gets_s?
    @Camel-man What...
  5. Replies
    11
    Views
    748

    In my loop I have *b2++; - it is calculating the...

    In my loop I have *b2++; - it is calculating the value of b in increasing order
    printf("%d%c", b2, ch[z]); ch[z] - is returning what it was supposed to show, but I am talking about b2, is returning...
  6. Replies
    11
    Views
    748

    For some reason printf("%d%c", b2, ch[z]); is...

    For some reason

    printf("%d%c", b2, ch[z]); is returning 13892292h instead of 6h. Looks like b2 is returning the address instead of value of variable. How can I change this part?
  7. Replies
    11
    Views
    748

    Thank you very much, Salem for your support I...

    Thank you very much, Salem for your support
    I have fixed the mistakes. Now it works. But for some reason- as an aswer I am getting some number ( I guess address) in stead of meaning



    #define...
  8. Replies
    11
    Views
    748

    How do pointers work

    I've started to learn pointers, but I am not sure how pointer's operations work. Can you demonstrate on this piece of code how can I use pointers in practice
    Thanx in advance!


    #define...
  9. Ah, great thanx. Works as a charm! char...

    Ah, great thanx. Works as a charm!

    char word2[] = "Long sentence";
    printf("%c", word2[3]);
  10. I tried this way char word2[20] = "Long...

    I tried this way

    char word2[20] = "Long sentence";
    printf("%s", word2[3]);

    but no success. What's my error?
  11. How to print out n-th symbol of string?

    Hello. I have a string
    char word[] = "Long sentence";
    How can I print out n-th symbol?
    for example "n" (third symbol)
  12. Read contents of textbox as string and pass it to another textbox as string

    Hello
    I have created a winform with 2 textboxes. I need to read the data from first textbox as a string and then pass this data to another textbox as a string. How can I do it?

    Here is the code...
  13. Replies
    4
    Views
    336

    Great thanx again Matticus

    Great thanx again Matticus
  14. Replies
    4
    Views
    336

    Ah, great, thanx Matticus I think I should dig...

    Ah, great, thanx Matticus
    I think I should dig deeper in my question.:redface:
    Here I am giving full code. It is algorithm of quick-sort
    In fact the program is working very good, But I can't...
  15. Replies
    4
    Views
    336

    Need help with a line

    Hello
    I am trying to analyze a piece of code from tutorials


    void quick_sort(int* sarr, int j) {
    int size = j;
    int k = 0;
    int c = sarr[(int)(j / 2)];
    int tmp = 0;
    }
  16. algorism , great thanx for your advise!

    algorism , great thanx for your advise!
  17. Rectangle is destroyed after the other is drawn

    Hello. I am trying to create a "Tetris" game.
    I am drawing a rectangle which is moving on the console. The rectangle is refreshed with "InvalidateRect" At the present moment I am testing it only...
Results 1 to 17 of 17