Hm.
Never struck me. Thanks!
Type: Posts; User: Dakshin
Hm.
Never struck me. Thanks!
Microsoft has published it's own tutorial :Learn to Program for Windows in C++ (Windows)
Hi, a while ago I started learning Windows Programming from a tutorial on the Microsoft website, and I learnt that you can call a message box from WM_CLOSE asking whether you want to close it or not....
Thanks a lot! You have no idea how big a weight has been lifted from my shoulders and all that sort of thing.:biggrin:
Hi, a month ago I completed a C++ class. Everything they taught was on the console screen, that is, the text only interface.
And then, I find out that C++ programs these days are all GUI and we...
Try creating individual strings for each word. Use a for loop to search the string for '\0' . It represents a space so it separates words.
The compiler isn't going to recognize : as something to separate strings. If you're going to do that, you will have to use just one %s
the syntax is:
char xyz[50];
fgets(xyz,50,stdin);
Put your string's name in the first parameter.
The second one specifies the size of the string. You can type it in or use the sizeof...
No, I don't think so... unless you manually type everything you see.
I don`t see why... the 0 is in quotes, isn`t it? The program is checking a character, not integer
Or you could just replace the EOF with
while ((c = getchar()) != '0')
and the program should stop with the loop.
You could take the declarations of Grade1,Grade2,etc. out of the main function and put them outside the declarations of all the functions. This will make it global and the program should work.
...
In answer to Salem's question, yes, TurboC does support %p .... I've tried it out!!
It's really good, thanks for sharing it!!!
s[0] will give you the value of the element at the first place in the array s ... unless s is a pointer
Thanks! open() is good!!
Hi,
I was just wondering, is there a way to open files withot using fopen() ??
If there is, please tell me it's syntax and if it has any opening modes like a,r,w,a+,r+, etc...
Thanks in...
Suppose a is an integer and you put it in an if statement like this:
int a;
for(a=1;a>0;a++)
{
if(a%10==0)
{
continue;
Please give more information. What does the program do?
You could try using a do while loop to get the number from the user and to display the error message if the number is incorrect
Then use a for loop to print the number.
do
{
...
You could create an integer and put it in a never-ending for loop.
Inside the loop,check the modulus of 10
I think the problem is because you're using EOF to check a character, try
while((ch=getchar())!='0')
instead of
while((ch=getchar())!=EOF)