Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dll load problem Pin
Laxman Auti22-May-06 18:56
Laxman Auti22-May-06 18:56 
GeneralRe: Dll load problem Pin
swatgodjr22-May-06 19:09
swatgodjr22-May-06 19:09 
GeneralRe: Dll load problem Pin
Laxman Auti22-May-06 19:19
Laxman Auti22-May-06 19:19 
GeneralRe: Dll load problem Pin
swatgodjr22-May-06 20:06
swatgodjr22-May-06 20:06 
GeneralRe: Dll load problem [modified] Pin
bob1697223-May-06 5:22
bob1697223-May-06 5:22 
GeneralRe: Dll load problem [modified] Pin
swatgodjr23-May-06 10:37
swatgodjr23-May-06 10:37 
GeneralRe: Dll load problem Pin
bob1697222-May-06 19:19
bob1697222-May-06 19:19 
Questionif failures Pin
Shane Ragone22-May-06 10:31
Shane Ragone22-May-06 10:31 
Hello,
When I created a small test file:
<code>
#include <iostream>
using std::cout;
using std::cin;
using std::endl;

int main()
{
int number;
cout << "Enter a number (1 or 2): ";
cin >> number;

if (number != 1 || number != 2)
{
cout << "You didn't enter a 1 or 2" << endl;
}
else
{
cout << number << endl;
}

return 0;
}</code>

The result always "You didn't enter a 1 or 2" no matter what number was entered. I tried changing the code to:
<code>
if ((number != 1) || (number != 2))
</code>
with the same results. Any clues? Thanks in advance.
AnswerRe: if failures Pin
Chris Losinger22-May-06 10:40
professionalChris Losinger22-May-06 10:40 
AnswerRe: if failures Pin
Ryan Binns22-May-06 18:35
Ryan Binns22-May-06 18:35 
Questionisinf function Pin
jayashri200622-May-06 10:08
jayashri200622-May-06 10:08 
AnswerRe: isinf function Pin
peterchen22-May-06 10:17
peterchen22-May-06 10:17 
GeneralRe: isinf function Pin
jayashri200622-May-06 11:01
jayashri200622-May-06 11:01 
GeneralRe: isinf function Pin
David Crow22-May-06 11:06
David Crow22-May-06 11:06 
GeneralRe: isinf function Pin
jayashri200623-May-06 4:20
jayashri200623-May-06 4:20 
GeneralRe: isinf function Pin
David Crow24-May-06 2:36
David Crow24-May-06 2:36 
GeneralRe: isinf function Pin
jayashri200624-May-06 11:56
jayashri200624-May-06 11:56 
GeneralRe: isinf function Pin
David Crow25-May-06 2:40
David Crow25-May-06 2:40 
GeneralRe: isinf function Pin
jayashri200626-May-06 9:06
jayashri200626-May-06 9:06 
QuestionPasting into a CEdit Control on a Dialog Pin
Doug Knudson22-May-06 9:55
Doug Knudson22-May-06 9:55 
AnswerRe: Pasting into a CEdit Control on a Dialog Pin
zt978822-May-06 17:58
zt978822-May-06 17:58 
GeneralRe: Pasting into a CEdit Control on a Dialog Pin
Doug Knudson23-May-06 2:20
Doug Knudson23-May-06 2:20 
QuestionReading from a ListBox Pin
Mahhouraaaaaa22-May-06 8:09
Mahhouraaaaaa22-May-06 8:09 
AnswerRe: Reading from a ListBox Pin
David Crow22-May-06 8:47
David Crow22-May-06 8:47 
AnswerRe: Reading from a ListBox Pin
Laxman Auti22-May-06 19:06
Laxman Auti22-May-06 19:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.