Click here to Skip to main content
15,891,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaldetecting if cursor is over a listview item Pin
Kuniva24-Mar-03 4:53
Kuniva24-Mar-03 4:53 
GeneralRe: detecting if cursor is over a listview item Pin
Ravi Bhavnani24-Mar-03 5:56
professionalRavi Bhavnani24-Mar-03 5:56 
QuestionAdding custom infos when building an application ? Pin
T.T.H.24-Mar-03 4:40
T.T.H.24-Mar-03 4:40 
AnswerRe: Adding custom infos when building an application ? Pin
Tim Ranker24-Mar-03 10:52
Tim Ranker24-Mar-03 10:52 
GeneralMemory Resident Databases Pin
Patje24-Mar-03 4:28
Patje24-Mar-03 4:28 
Generalchanging icon of an addin,pleeze hlp! Pin
schaereran@gmx.net24-Mar-03 4:18
schaereran@gmx.net24-Mar-03 4:18 
GeneralReading from a text file __ help me__ Pin
Scozturk24-Mar-03 4:11
professionalScozturk24-Mar-03 4:11 
GeneralRe: Reading from a text file __ help me__ Pin
jhwurmbach24-Mar-03 4:26
jhwurmbach24-Mar-03 4:26 
Scolinks wrote:
and if I know how many lines are in that text file

You could just read through it, counting, in a first run and then do the read-in in a second run, after having allocated the memory you would need.
Or simply use containers that C++ offers you:
std::vector < std::string >
You can call push_back()( with every new line, and as long as your file is not larger than the available memory, the container will grow.




My opinions may have changed, but not the fact that I am right.
Generalnormalizing pathnames Pin
berndg24-Mar-03 4:04
berndg24-Mar-03 4:04 
GeneralRe: normalizing pathnames Pin
PJ Arends24-Mar-03 5:14
professionalPJ Arends24-Mar-03 5:14 
GeneralRe: normalizing pathnames Pin
berndg24-Mar-03 6:04
berndg24-Mar-03 6:04 
GeneralRe: normalizing pathnames Pin
PJ Arends24-Mar-03 10:31
professionalPJ Arends24-Mar-03 10:31 
QuestionClear file contents with fstream? Pin
Rickard Andersson2024-Mar-03 3:34
Rickard Andersson2024-Mar-03 3:34 
AnswerRe: Clear file contents with fstream? Pin
Nick Parker24-Mar-03 3:44
protectorNick Parker24-Mar-03 3:44 
GeneralRe: Clear file contents with fstream? Pin
Rickard Andersson2024-Mar-03 3:52
Rickard Andersson2024-Mar-03 3:52 
AnswerRe: Clear file contents with fstream? Pin
Ted Ferenc24-Mar-03 12:41
Ted Ferenc24-Mar-03 12:41 
GeneralRe: Clear file contents with fstream? Pin
Rickard Andersson2024-Mar-03 21:54
Rickard Andersson2024-Mar-03 21:54 
GeneralRe: Clear file contents with fstream? Pin
Ted Ferenc25-Mar-03 8:51
Ted Ferenc25-Mar-03 8:51 
Generalproblem with message box Pin
r i s h a b h s24-Mar-03 2:22
r i s h a b h s24-Mar-03 2:22 
GeneralRe: problem with message box Pin
valikac24-Mar-03 11:15
valikac24-Mar-03 11:15 
GeneralRe: problem with message box Pin
John R. Shaw24-Mar-03 11:31
John R. Shaw24-Mar-03 11:31 
GeneralRe: problem with message box Pin
r i s h a b h s24-Mar-03 22:18
r i s h a b h s24-Mar-03 22:18 
GeneralRe: problem with message box Pin
John R. Shaw25-Mar-03 8:54
John R. Shaw25-Mar-03 8:54 
Generalmultithreading Pin
summo24-Mar-03 1:38
summo24-Mar-03 1:38 
GeneralRe: multithreading Pin
Ravi Bhavnani24-Mar-03 2:08
professionalRavi Bhavnani24-Mar-03 2:08 

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.