Click here to Skip to main content
15,885,546 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Thats why i hate c++ Pin
CDP180227-Apr-12 8:19
CDP180227-Apr-12 8:19 
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 10:07
krsmichael27-Apr-12 10:07 
GeneralRe: Thats why i hate c++ Pin
Gerry Schmitz27-Apr-12 12:02
mveGerry Schmitz27-Apr-12 12:02 
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 14:34
krsmichael27-Apr-12 14:34 
GeneralRe: Thats why i hate c++ Pin
CDP180227-Apr-12 7:32
CDP180227-Apr-12 7:32 
GeneralRe: Thats why i hate c++ Pin
Vasily Tserekh27-Apr-12 7:51
Vasily Tserekh27-Apr-12 7:51 
GeneralRe: Thats why i hate c++ Pin
CDP180227-Apr-12 8:36
CDP180227-Apr-12 8:36 
GeneralRe: Thats why i hate c++ Pin
Al_Brown29-Apr-12 20:59
Al_Brown29-Apr-12 20:59 
(from the code in your link)
C++
void TfrmMain::GetDir()
{
 TFileListBox * ListBox = new TFileListBox(this);
 frmMain->InsertControl(ListBox);
 AnsiString way = ListBox->Directory;
 way=way+" audio";
 way[way.Length()-5]=92;
 dir=way;
 way=way.SubString(0,way.Length()-6);
 ListBox->Directory=way;
 frmMain->RemoveControl(ListBox);  
}


If it's your code, I think you may want to learn a little more before complaining about C++. One thing you certainly should take into account is that C++ is not a managed language and constructing objects and never deleting them will lead to memory leaks.
GeneralRe: Thats why i hate c++ Pin
patbob27-Apr-12 12:28
patbob27-Apr-12 12:28 
GeneralRe: Thats why i hate c++ Pin
KP Lee27-Apr-12 13:26
KP Lee27-Apr-12 13:26 
GeneralRe: Thats why i hate c++ Pin
Member 869706828-Apr-12 9:01
professionalMember 869706828-Apr-12 9:01 
GeneralRe: Thats why i hate c++ Pin
mandyedi28-Apr-12 9:03
mandyedi28-Apr-12 9:03 
GeneralRe: Thats why i hate c++ Pin
Charles Oppermann27-Apr-12 2:34
Charles Oppermann27-Apr-12 2:34 
GeneralRe: Thats why i hate c++ Pin
KP Lee27-Apr-12 13:46
KP Lee27-Apr-12 13:46 
GeneralRe: Thats why i hate c++ Pin
OriginalGriff24-Apr-12 9:20
mveOriginalGriff24-Apr-12 9:20 
GeneralRe: Thats why i hate c++ Pin
jeron124-Apr-12 10:15
jeron124-Apr-12 10:15 
GeneralRe: Thats why i hate c++ Pin
CDP180224-Apr-12 10:51
CDP180224-Apr-12 10:51 
GeneralRe: Thats why i hate c++ Pin
KP Lee27-Apr-12 14:24
KP Lee27-Apr-12 14:24 
GeneralRe: Thats why i hate c++ Pin
Jörgen Andersson24-Apr-12 11:42
professionalJörgen Andersson24-Apr-12 11:42 
GeneralRe: Thats why i hate c++ Pin
Gary Huck27-Apr-12 3:45
Gary Huck27-Apr-12 3:45 
GeneralRe: Thats why i hate c++ Pin
Mohibur Rashid24-Apr-12 17:28
professionalMohibur Rashid24-Apr-12 17:28 
GeneralRe: Thats why i hate c++ Pin
CDP180225-Apr-12 4:06
CDP180225-Apr-12 4:06 
GeneralRe: Thats why i hate c++ Pin
Mohibur Rashid25-Apr-12 4:34
professionalMohibur Rashid25-Apr-12 4:34 
GeneralRe: Thats why i hate c++ Pin
CDP180226-Apr-12 21:23
CDP180226-Apr-12 21:23 
GeneralRe: Thats why i hate c++ Pin
Mike Winiberg26-Apr-12 20:49
professionalMike Winiberg26-Apr-12 20:49 

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.