Click here to Skip to main content
15,921,959 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalkeyframe scene detection Pin
Emiliano21-Aug-03 4:58
Emiliano21-Aug-03 4:58 
GeneralRe: keyframe scene detection Pin
Joey Bloggs21-Aug-03 21:27
Joey Bloggs21-Aug-03 21:27 
GeneralComboBox in Modal DIalog Pin
Karen030221-Aug-03 4:40
Karen030221-Aug-03 4:40 
GeneralRe: ComboBox in Modal DIalog Pin
valikac21-Aug-03 5:12
valikac21-Aug-03 5:12 
Generalautomate excel copy and paste Pin
Anonymous21-Aug-03 4:40
Anonymous21-Aug-03 4:40 
GeneralRe: automate excel copy and paste Pin
David Crow21-Aug-03 7:13
David Crow21-Aug-03 7:13 
GeneralRe: automate excel copy and paste Pin
Jason Truong25-Aug-03 3:36
Jason Truong25-Aug-03 3:36 
QuestionVery strange bug - conflict between file IO and list?? Pin
Kuniva21-Aug-03 4:38
Kuniva21-Aug-03 4:38 
I have a TCP server that uses two classes: a ConnectionManager and a DbgConsole. U can specify a parameter in console to turn on logging. It just outputs all its output through DbgConsole with a function called ConsoleOutput() which just couts a string to the console and if logging is enabled writes the string to a file. When logging is turned on, the DbgConsole class opens a new file and stores the file handle in a private member variable of that class. From then on the ConsoleOutput function just uses that handle to write to the file and log every line. This works great UNTILL...
I have a function AddConnection in the ConnectionManager class like this:

<pre>
void ConnectionManager::AddConnection(SOCKET _sd)
{
ClientConnection *cc = new ClientConnection;
cc->s = _sd;

cl.push_back(cc);
PrintClientList();
}
</pre>

This just adds the socket in a struct to the list, this is the PrintClientList() function:
<pre>
void ConnectionManager::PrintClientList()
{
cout << "Client list(by socket handle):" << endl;
CLI cli;
for ( cli = cl.begin(); cli != cl.end(); ++ cli )
{
cout << (*cli)->s << endl;
}
return;
}
</pre>

So whenever i add a connection it adds it to the list and prints the list of socket handles out to the console. This works fine untill logging is turned on. If i leave out the printing of the list (so PrintClientList()) then it works fine, but if i include it my app crashes, even though it prints it fine if logging is disabled.. I can't figure out what the problem is.. Does anyone have any ideas?

Kuniva
--------------------------------------------

QuestionWhy toolbar created by CreateExdo not creates tool-tips? Pin
vgrigor21-Aug-03 4:36
vgrigor21-Aug-03 4:36 
GeneralRich Edit box (no MFC) Pin
Kayembi21-Aug-03 4:25
Kayembi21-Aug-03 4:25 
GeneralRe: Rich Edit box (no MFC) Pin
Ryan Binns21-Aug-03 4:55
Ryan Binns21-Aug-03 4:55 
GeneralRe: Rich Edit box (no MFC) Pin
Kayembi21-Aug-03 7:14
Kayembi21-Aug-03 7:14 
GeneralRe: Rich Edit box (no MFC) Pin
Ryan Binns21-Aug-03 16:48
Ryan Binns21-Aug-03 16:48 
GeneralWH_MSGFILTER Windows Hook Pin
Member 43620221-Aug-03 4:12
Member 43620221-Aug-03 4:12 
Generalmapping enum -> name Pin
peterchen21-Aug-03 3:59
peterchen21-Aug-03 3:59 
GeneralRe: mapping enum -&gt; name Pin
valikac21-Aug-03 5:15
valikac21-Aug-03 5:15 
GeneralRe: mapping enum -&gt; name Pin
peterchen21-Aug-03 5:33
peterchen21-Aug-03 5:33 
GeneralRe: mapping enum -> name Pin
Jörgen Sigvardsson21-Aug-03 7:35
Jörgen Sigvardsson21-Aug-03 7:35 
GeneralCreating Device Context Pin
Larry J. Siddens21-Aug-03 3:29
Larry J. Siddens21-Aug-03 3:29 
GeneralRe: Creating Device Context Pin
PJ Arends21-Aug-03 9:16
professionalPJ Arends21-Aug-03 9:16 
QuestionTAPI. Is it possible? Pin
Ahmad9921-Aug-03 3:28
Ahmad9921-Aug-03 3:28 
AnswerRe: TAPI. Is it possible? Pin
Joey Bloggs21-Aug-03 21:35
Joey Bloggs21-Aug-03 21:35 
GeneralTAPI. Is it possible Pin
Ahmad9921-Aug-03 3:27
Ahmad9921-Aug-03 3:27 
GeneralRe: TAPI. Is it possible Pin
David Crow21-Aug-03 4:17
David Crow21-Aug-03 4:17 
QuestionHow to develop Search Engine like google. Pin
Ahmad9921-Aug-03 3:15
Ahmad9921-Aug-03 3:15 

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.