Click here to Skip to main content
15,901,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: question for avcodec_open of ffmpeg Pin
sashoalm22-Oct-08 0:49
sashoalm22-Oct-08 0:49 
GeneralRe: question for avcodec_open of ffmpeg Pin
finn_nast22-Oct-08 1:26
finn_nast22-Oct-08 1:26 
GeneralRe: question for avcodec_open of ffmpeg Pin
sashoalm23-Oct-08 0:06
sashoalm23-Oct-08 0:06 
Question[Message Deleted] Pin
anna mathew21-Oct-08 20:42
anna mathew21-Oct-08 20:42 
AnswerRe: VC++ database programming Pin
Iain Clarke, Warrior Programmer21-Oct-08 21:46
Iain Clarke, Warrior Programmer21-Oct-08 21:46 
QuestionSending a File to server through HTTP [modified] Pin
Dhiraj kumar Saini21-Oct-08 19:43
Dhiraj kumar Saini21-Oct-08 19:43 
QuestionFile String Sorting Pin
cpvc++21-Oct-08 19:37
cpvc++21-Oct-08 19:37 
AnswerRe: File String Sorting Pin
enhzflep21-Oct-08 20:12
enhzflep21-Oct-08 20:12 
Use linked lists, either from the STL or of your own making.

Open File, read each line into a new list item.
Go through the list, remove any list items that match the current item.
Save the list items one-by-one back into a new file.

Or

Open file, read file line by line - doing nothing other than counting the number of lines.
Create an array with this many pointers to a string
Reset file pointer
For each line in file:
read line,
determine length,
allocate mem and store pointer in lineArray[currentLine],
copy string to this memory.

For each item in the lineArray
do a strcmp on all items that follow
if the strings match, free the memory of the matching line, and set it's pointer to NULL

For each item in the line Array
if the pointer isn't NULL, it contains a unique string.
If the pointer is NULL, the string wasn't unique and has been removed.
either print or save to file all of the valid strings remaining in the array

For each item in the array
free the used memory (free won't fail on a NULL pointer)
AnswerRe: File String Sorting Pin
Cedric Moonen21-Oct-08 20:33
Cedric Moonen21-Oct-08 20:33 
GeneralRe: File String Sorting Pin
Iain Clarke, Warrior Programmer21-Oct-08 21:48
Iain Clarke, Warrior Programmer21-Oct-08 21:48 
GeneralRe: File String Sorting Pin
Cedric Moonen21-Oct-08 22:09
Cedric Moonen21-Oct-08 22:09 
GeneralRe: File String Sorting Pin
BadKarma21-Oct-08 23:47
BadKarma21-Oct-08 23:47 
QuestionSize of Structure Pin
Anu_Bala21-Oct-08 19:21
Anu_Bala21-Oct-08 19:21 
AnswerRe: Size of Structure Pin
Mark Salsbery21-Oct-08 19:39
Mark Salsbery21-Oct-08 19:39 
QuestionHow to find a child window? Pin
Mohammad Khodaea21-Oct-08 19:18
Mohammad Khodaea21-Oct-08 19:18 
AnswerRe: How to find a child window? Pin
Naveen21-Oct-08 20:12
Naveen21-Oct-08 20:12 
QuestionUnhandled exception ? Pin
Le@rner21-Oct-08 19:02
Le@rner21-Oct-08 19:02 
AnswerRe: Unhandled exception ? Pin
Mark Salsbery21-Oct-08 19:32
Mark Salsbery21-Oct-08 19:32 
GeneralRe: Unhandled exception ? Pin
Le@rner21-Oct-08 19:49
Le@rner21-Oct-08 19:49 
QuestionRe: Unhandled exception ? Pin
Mark Salsbery21-Oct-08 20:04
Mark Salsbery21-Oct-08 20:04 
AnswerRe: Unhandled exception ? Pin
Le@rner21-Oct-08 20:14
Le@rner21-Oct-08 20:14 
GeneralRe: Unhandled exception ? Pin
Mark Salsbery21-Oct-08 20:21
Mark Salsbery21-Oct-08 20:21 
GeneralRe: Unhandled exception ? Pin
Le@rner21-Oct-08 20:23
Le@rner21-Oct-08 20:23 
QuestionC/C++ question - Function prototype in other function Pin
Adeel Chaudhry21-Oct-08 18:17
Adeel Chaudhry21-Oct-08 18:17 
AnswerRe: C/C++ question - Function prototype in other function Pin
Naveen21-Oct-08 18:47
Naveen21-Oct-08 18:47 

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.