Click here to Skip to main content
15,885,910 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to store a file in a single variable? Pin
Adam Roderick J15-Nov-09 18:20
Adam Roderick J15-Nov-09 18:20 
GeneralRe: How to store a file in a single variable? Pin
Paulraj G15-Nov-09 18:22
Paulraj G15-Nov-09 18:22 
Questionprint it only if it is not a duplicate [modified][solved] Pin
Omegaclass15-Nov-09 14:01
Omegaclass15-Nov-09 14:01 
AnswerRe: print it only if it is not a duplicate Pin
Chris Losinger15-Nov-09 15:16
professionalChris Losinger15-Nov-09 15:16 
GeneralRe: print it only if it is not a duplicate Pin
Omegaclass19-Nov-09 20:56
Omegaclass19-Nov-09 20:56 
GeneralRe: print it only if it is not a duplicate Pin
Chris Losinger20-Nov-09 4:32
professionalChris Losinger20-Nov-09 4:32 
GeneralRe: print it only if it is not a duplicate Pin
Omegaclass20-Nov-09 14:56
Omegaclass20-Nov-09 14:56 
GeneralRe: print it only if it is not a duplicate Pin
Chris Losinger20-Nov-09 15:16
professionalChris Losinger20-Nov-09 15:16 
Omegaclass wrote:
dose all this belong in the same for loop?


you'll have two loops. one inside the other.

Omegaclass wrote:
i am not sure what you are saying in "read a value"


that's where you get the next input. your original msg says "Read in 20 numbers,
each of which is between 10 and 100, inclusive." so, if the test data is coming from a file, you'll need to open that file then read each number one at a time. or, if it's coming from the keyboard, or from stdin, or cin, etc..

rand() will work for testing, i guess. but that seems like a strange assignment. i know when i would get assignment like this, the instructor would have a set of data files that he'd send into the program, to make sure the app was doing what it was supposed to on known input.

Omegaclass wrote:
how do i implement "see if you've already read that number" if after the 2nd number i will need to see if the previous number has been read and chick if it's a duplicate.


the previous number will be in the storage array - if it was duplicate, it was already there; if it was a new one, then you will have added it. so, you just need to loop through the items in the storage array and compare each one to the new value.


GeneralRe: print it only if it is not a duplicate Pin
Omegaclass21-Nov-09 20:31
Omegaclass21-Nov-09 20:31 
QuestionHooking CreateRemoteThread [modified] Pin
hxhl9515-Nov-09 13:50
hxhl9515-Nov-09 13:50 
AnswerRe: Hooking CreateRemoteThread Pin
Naveen15-Nov-09 16:56
Naveen15-Nov-09 16:56 
GeneralRe: Hooking CreateRemoteThread Pin
hxhl9515-Nov-09 17:09
hxhl9515-Nov-09 17:09 
GeneralRe: Hooking CreateRemoteThread Pin
Naveen15-Nov-09 17:17
Naveen15-Nov-09 17:17 
GeneralRe: Hooking CreateRemoteThread Pin
hxhl9515-Nov-09 17:20
hxhl9515-Nov-09 17:20 
GeneralRe: Hooking CreateRemoteThread Pin
Naveen15-Nov-09 17:32
Naveen15-Nov-09 17:32 
GeneralRe: Hooking CreateRemoteThread Pin
hxhl9515-Nov-09 17:39
hxhl9515-Nov-09 17:39 
GeneralRe: Hooking CreateRemoteThread Pin
Naveen15-Nov-09 17:59
Naveen15-Nov-09 17:59 
QuestionWhat Windows API function is called to create / show a dialog box. Pin
hongheo7615-Nov-09 11:43
hongheo7615-Nov-09 11:43 
AnswerRe: What Windows API function is called to create / show a dialog box. Pin
Code-o-mat15-Nov-09 20:25
Code-o-mat15-Nov-09 20:25 
QuestionProblem debugging an app with VC++ Pin
timbk15-Nov-09 10:09
timbk15-Nov-09 10:09 
AnswerRe: Problem debugging an app with VC++ Pin
Chris Losinger15-Nov-09 10:58
professionalChris Losinger15-Nov-09 10:58 
GeneralRe: Problem debugging an app with VC++ Pin
timbk15-Nov-09 14:23
timbk15-Nov-09 14:23 
GeneralRe: Problem debugging an app with VC++ Pin
Chris Losinger15-Nov-09 14:43
professionalChris Losinger15-Nov-09 14:43 
GeneralRe: Problem debugging an app with VC++ Pin
timbk15-Nov-09 15:01
timbk15-Nov-09 15:01 
GeneralRe: Problem debugging an app with VC++ Pin
Chris Losinger15-Nov-09 15:06
professionalChris Losinger15-Nov-09 15: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.