|
I don't think you meant this message for me.
|
|
|
|
|
Hi Claude,
The reason of the problem is that the code uses the definition of MultiMon.h for function MonitorFromRect instead of using the native definition of this function coming from WinUser.h. Solution : remove line "include MultiMon.h" from OXToolTipCtrl.cpp to force the usage of WinUser.h definition for this function.
Florianne
|
|
|
|
|
I open VS2015, click New Project, Select "Win32 Console Application"
Click OK.The dialog closes, then reopens.
Click OK.The dialog closes, then reopens.
Click OK.The dialog closes, then reopens.
.
.
.
C# apps work fine, just not C++,
Anyone seen this? Why can't I create a C++ console app?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
What dialog do you mean? I don't have dialogs in my console apps and I've written a few hundred of them.
|
|
|
|
|
As I said, the New Project dialog
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Visual Studio install has got corrupted somehow, go to Control panel on the Visual Studio entry do a repair. It usually fixes the problem.
In vino veritas
|
|
|
|
|
|
write a program that can be enter the password , if the correct password,the output will display "Your password is correct" if not the output will display "Your password is incorrect" and prompted to re enter a password.
this is my code but i still cant figure out what its prolblem.
#include <stdio.h>
int main()
{
int password=12345;
printf("Please insert your password:\n");
scanf("%p" , &password);
if(password=12345);
{
printf("Your password is correct");
}
if else(password!=12345);
{
printf("Your password is incorrect");
}
}
its say error expected '(' before 'else'..
kindly anybody can help me..please..
modified 27-Jan-17 9:56am.
|
|
|
|
|
Please read the sticky post (actually) just above yours: HOW TO ASK A QUESTION - C / C++ / MFC Discussion Boards[^]
Quote: Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Quote: If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums
You won't get code written for you here. Just try it yourself and tell us where you got stuck. Then we will try to help.
|
|
|
|
|
|
write it yourself and then ask here if you have specific problems
|
|
|
|
|
Member 12968703 wrote: its say error expected '(' before 'else'..
The error message already told what is the problem: just read it and check the code that it points out, in this case the else statement: that particular line is incorrect and needs fixing.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
scanf("%p" , &password);
if(password=12345); {
printf("Your password is correct");
}
if else(password!=12345);
|
|
|
|
|
Also remove the semicolons following the right parens.
|
|
|
|
|
|
I mean the right parens on the lines with ifs.
The one on this line :
if(password=12345);
Will cause the printf to always execute.
|
|
|
|
|
I know, hence my , indicating my stupidity.
|
|
|
|
|
#include <stdio.h>
int main()
{
float number = 123456;
int pass;
printf("Please enter your password:\n");
scanf("%d",&pass);
if (pass==number)
{
printf("Your password is correct.\n");
}
else
{
printf("Your password is incorrect.\n");
}
}
i already write the program but i dont know how to make a prompted to re enter a password if i enter a wrong password..i really dont know..and i hope u can help me..
|
|
|
|
|
You do it be creating a loop, using a do , while or for statement. In pseudo code something like:
Set a retry count
While retry is not zero
Check password
If password is correct
Then break
Else
retry = retry - 1
If retry is zero
Then display error message
End While
See if you can turn that into C code.
|
|
|
|
|
Member 12968703 wrote: if (pass==number) Comparing an int to a float will rarely, if ever, work.
Member 12968703 wrote: but i dont know how to make a prompted to re enter a password if i enter a wrong password..i really dont know..and i hope u can help me.. To continue the prompting until the correct password is entered, you'll need to use a loop. Something like:
do
{
...
} while (password != 12345);
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
if else(password!=12345);
You need to learn better the if-else structure.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
write a program to find voltage when enter current and resistor value using the following formula:voltage=current x resistor
#include<stdio.h>
float main()
{
float current,resistor,voltage;
printf("Enter the current value:");
scanf("%f",¤t);
printf("Enter the resistor value:");
scanf("%f",&resistor);
voltage = current*resistor;
{
printf("Total voltage=%2f V");
}
return 0;
}
i try this but i cant find the correct output..
please help me..i am a student..
|
|
|
|
|
You forgot to pass the voltage argument to printf :
printf("Total voltage=%f V\n", voltage);
Note also that the return value of main() is int by definition and can not be float .
|
|
|
|
|
That, and there's some weird line, although it may just be a case of messed up copy/pasting:
scanf("%f",¤t);
should be:
scanf("%f",¤t);
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
When you don't understand what your code is doing or why it does what it does, the answer is debugger.
Use the debugger to see what your code is doing. It allow you to execute lines 1 by 1 and to inspect variables as it execute, it is an incredible learning tool.
Debugger - Wikipedia, the free encyclopedia[^]
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
The debugger is here to show you what your code is doing and your task is to compare with what it should do.
There is no magic in the debugger, it don't find bugs, it just help you to. When the code don't do what is expected, you are close to a bug.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|