Click here to Skip to main content
15,867,704 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.

 
GeneralPass by value and pass by reference Pin
Sherin Iranimose17-Jul-08 6:49
Sherin Iranimose17-Jul-08 6:49 
GeneralRe: Pass by value and pass by reference Pin
Maximilien17-Jul-08 7:26
Maximilien17-Jul-08 7:26 
GeneralRe: Pass by value and pass by reference Pin
Sherin Iranimose17-Jul-08 18:21
Sherin Iranimose17-Jul-08 18:21 
GeneralRe: Pass by value and pass by reference Pin
BillW333-Sep-08 2:44
professionalBillW333-Sep-08 2:44 
GeneralRe: Pass by value and pass by reference PinPopular
Pete O'Hanlon17-Jul-08 9:25
subeditorPete O'Hanlon17-Jul-08 9:25 
JokeRe: Pass by value and pass by reference Pin
Big Daddy Farang17-Jul-08 10:03
Big Daddy Farang17-Jul-08 10:03 
GeneralRe: Pass by value and pass by reference Pin
Chris Meech17-Jul-08 11:43
Chris Meech17-Jul-08 11:43 
GeneralRe: Pass by value and pass by reference Pin
Big Daddy Farang17-Jul-08 11:50
Big Daddy Farang17-Jul-08 11:50 
GeneralRe: Pass by value and pass by reference Pin
Paul Conrad17-Jul-08 16:24
professionalPaul Conrad17-Jul-08 16:24 
JokeRe: Pass by value and pass by reference Pin
Sherin Iranimose17-Jul-08 18:28
Sherin Iranimose17-Jul-08 18:28 
GeneralRe: Pass by value and pass by reference Pin
Muigai Mwaura21-Jul-08 23:04
Muigai Mwaura21-Jul-08 23:04 
GeneralRe: Pass by value and pass by reference Pin
Paul Conrad17-Jul-08 16:23
professionalPaul Conrad17-Jul-08 16:23 
GeneralRe: Pass by value and pass by reference Pin
Sherin Iranimose17-Jul-08 18:23
Sherin Iranimose17-Jul-08 18:23 
GeneralRe: Pass by value and pass by reference Pin
darkelv17-Jul-08 20:08
darkelv17-Jul-08 20:08 
GeneralRe: Pass by value and pass by reference Pin
Paul Conrad18-Jul-08 2:55
professionalPaul Conrad18-Jul-08 2:55 
GeneralRe: Pass by value and pass by reference Pin
V.17-Jul-08 22:17
professionalV.17-Jul-08 22:17 
GeneralRe: Pass by value and pass by reference Pin
CPallini17-Jul-08 23:09
mveCPallini17-Jul-08 23:09 
GeneralRe: Pass by value and pass by reference Pin
Joe Woodbury19-Jul-08 9:12
professionalJoe Woodbury19-Jul-08 9:12 
This is incorrect. Classes are passed by reference, Structs are passed by value.

CPallini wrote:
BTW: passing by value an object implies that called function can actually change object's internal state.
[Smile]


This means nothing of the sort. Passing by value simply means that an object in a method is distinct from the original object and any changes made to that object are not reflected in the original.


Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke


GeneralRe: Pass by value and pass by reference Pin
CPallini20-Jul-08 3:56
mveCPallini20-Jul-08 3:56 
GeneralRe: Pass by value and pass by reference Pin
Joe Woodbury19-Jul-08 9:07
professionalJoe Woodbury19-Jul-08 9:07 
GeneralRe: Pass by value and pass by reference Pin
KarstenK21-Jul-08 2:42
mveKarstenK21-Jul-08 2:42 
AnswerRe: Pass by value and pass by reference Pin
Mitendra Anand21-Jul-08 20:58
Mitendra Anand21-Jul-08 20:58 
GeneralRe: Pass by value and pass by reference Pin
jon_17523-Jul-08 12:00
jon_17523-Jul-08 12:00 
GeneralRe: Pass by value and pass by reference Pin
Mitendra Anand23-Jul-08 21:01
Mitendra Anand23-Jul-08 21:01 

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.