Search:

Type: Posts; User: saqib_

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    992

    Use switch statement in these type of situations....

    Use switch statement in these type of situations. It's better. int main() means that it is returning some value after it's execution. Either make it void main() as in here or return any integer at...
  2. Replies
    4
    Views
    1,159

    When declaring a multi dimensional array keep...

    When declaring a multi dimensional array keep this formula in mind.
    ARRAY [ROWS] [COLUMNS] , that is A [2] [5] means that array A has 2 rows and 5 columns. By the way I don't recommend you using...
  3. Replies
    11
    Views
    1,613

    You can use any of the loops mentioned by iMalc....

    You can use any of the loops mentioned by iMalc. You can try using goto statement. It is not recommended though as it makes a program complex. Use break; instead of cin.get(); as it is not a sure...
  4. Replies
    4
    Views
    20,797

    Thanks.

    Thanks.
  5. Replies
    4
    Views
    20,797

    : ) Lols. How could I miss that. I saw that many...

    : ) Lols. How could I miss that. I saw that many times. I think I was not in a frame of mind then. Well, correcting that it still annoys me though.


    #include <stdio.h>

    #define MAXLINE 1000
    ...
  6. Replies
    4
    Views
    20,797

    conflicting types for getline() fix

    I am trying to compile a small program on linux. Here is the code.


    #include <stdio.h>

    #define MAXLINE 1000

    int getline(char line[], int maxline);
    void copy(char to[], char from[]);
  7. Replies
    35
    Views
    8,117

    I see. Thank you.

    I see. Thank you.
  8. Replies
    35
    Views
    8,117

    Yes, we should prefer ++i to i++.

    Yes, we should prefer ++i to i++.
  9. Replies
    35
    Views
    8,117

    Guys can't we use the transform function here...

    Guys can't we use the transform function here like the one used in the following code?



    #include <iostream>
    #include <algorithm>
    #include <cctype>
    #include <cstring>
    #include <cstdlib>
  10. Replies
    35
    Views
    8,117

    Well it would be very useful if you show me how...

    Well it would be very useful if you show me how to do it, as I am a beginner in C++. I have not used strupper and strlower before.
  11. Replies
    35
    Views
    8,117

    toupper() & tolower() problem?

    The following code converts the string copied to uppercase and then to lowercase again.


    // Convert a string to uppercase & lowercase

    #include <iostream>
    #include <cstdlib>
    #include...
Results 1 to 11 of 11