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...
Type: Posts; User: saqib_
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...
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...
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...
Thanks.
: ) 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
...
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[]);
I see. Thank you.
Yes, we should prefer ++i to i++.
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>
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.
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...