Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Listbox control not accessible in another class?? [modified] Pin
AmbiguousName19-Sep-10 2:37
AmbiguousName19-Sep-10 2:37 
GeneralRe: Listbox control not accessible in another class?? Pin
Richard MacCutchan19-Sep-10 7:21
mveRichard MacCutchan19-Sep-10 7:21 
AnswerRe: Listbox control not accessible in another class?? Pin
Luc Pattyn19-Sep-10 3:54
sitebuilderLuc Pattyn19-Sep-10 3:54 
AnswerRe: Listbox control not accessible in another class?? Pin
AmbiguousName19-Sep-10 4:05
AmbiguousName19-Sep-10 4:05 
GeneralRe: Listbox control not accessible in another class?? Pin
Luc Pattyn19-Sep-10 4:18
sitebuilderLuc Pattyn19-Sep-10 4:18 
Questionconnection dde server to excel Pin
zon_cpp18-Sep-10 20:45
zon_cpp18-Sep-10 20:45 
Questionfstream, fail() Pin
James_72218-Sep-10 18:48
James_72218-Sep-10 18:48 
AnswerRe: fstream, fail() Pin
Aescleal18-Sep-10 21:10
Aescleal18-Sep-10 21:10 
The artifacts are due to the way you're controlling the loop. Check what std::istream::get actually returns. Note that your cyphertext already has an extra character in it so your encrypt is part of the problem.

Just out of interest, as you're programming in C++ and not C:

- get rid of all the explicit opens/closes, you don't need them, destructors are wonderful things
- instead of letting a user crash your code by entering a filename of longer than 200 characters use std::strings and std::getline
- don't use macros, a pair of functions would have worked as well and enabled you to use the same code for encryption and decryption (the same goes for C BTW)

I'd also consider splitting the encrypt/decrypt bits of your code from all the guff asking for filenames, then you'd have something you can unit test without all the nuts ache of entering files all the time.

Cheers,

Ash
QuestionUnsigned/Signed Pin
Fareed Rizkalla18-Sep-10 6:32
Fareed Rizkalla18-Sep-10 6:32 
AnswerRe: Unsigned/Signed Pin
Tim Craig18-Sep-10 7:03
Tim Craig18-Sep-10 7:03 
GeneralRe: Unsigned/Signed Pin
oggenok6418-Sep-10 9:00
oggenok6418-Sep-10 9:00 
GeneralRe: Unsigned/Signed Pin
josda100020-Sep-10 11:20
josda100020-Sep-10 11:20 
AnswerRe: Unsigned/Signed PinPopular
Chris Losinger18-Sep-10 10:01
professionalChris Losinger18-Sep-10 10:01 
QuestionHow to move rectangle with mouse Pin
raju_shiva18-Sep-10 1:10
raju_shiva18-Sep-10 1:10 
AnswerRe: How to move rectangle with mouse Pin
Richard MacCutchan18-Sep-10 2:58
mveRichard MacCutchan18-Sep-10 2:58 
AnswerRe: How to move rectangle with mouse Pin
«_Superman_»19-Sep-10 20:57
professional«_Superman_»19-Sep-10 20:57 
GeneralRe: How to move rectangle with mouse Pin
raju_shiva21-Sep-10 18:59
raju_shiva21-Sep-10 18:59 
Questionerror LNK2001 and fatal error LNK1120 Pin
AmbiguousName17-Sep-10 22:25
AmbiguousName17-Sep-10 22:25 
AnswerRe: error LNK2001 and fatal error LNK1120 Pin
Richard MacCutchan17-Sep-10 23:03
mveRichard MacCutchan17-Sep-10 23:03 
AnswerRe: error LNK2001 and fatal error LNK1120 Pin
Carlos_never18-Sep-10 0:25
Carlos_never18-Sep-10 0:25 
GeneralRe: error LNK2001 and fatal error LNK1120 Pin
AmbiguousName18-Sep-10 8:57
AmbiguousName18-Sep-10 8:57 
QuestionHow to access BITMAP bmBits - getting void* - unknown size error . Pin
Vaclav_17-Sep-10 18:34
Vaclav_17-Sep-10 18:34 
AnswerRe: How to access BITMAP bmBits - getting void* - unknown size error . Pin
Richard MacCutchan17-Sep-10 22:04
mveRichard MacCutchan17-Sep-10 22:04 
GeneralRe: How to access BITMAP bmBits - getting void* - unknown size error . SOLVED Pin
Vaclav_18-Sep-10 6:04
Vaclav_18-Sep-10 6:04 
GeneralRe: How to access BITMAP bmBits - getting void* - unknown size error . SOLVED Pin
Richard MacCutchan18-Sep-10 6:10
mveRichard MacCutchan18-Sep-10 6:10 

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.