Forum: C++ Mar 8th, 2007 |
| Replies: 3 Views: 1,686 The syntax of strcmp is strcmp( string1, string2 ) - not strcmp( string1/string2) |
Forum: C++ Nov 25th, 2006 |
| Replies: 8 Views: 3,188 If you have gone this far, wont it be more generic to say that inorder to pass by reference in the end you need the address of the data segment.
You need a pointer, whether that be near or far.... |
Forum: C++ Nov 25th, 2006 |
| Replies: 13 Views: 4,673 Odd. K & R is how I got started in C. There were plenty of diabolical introductory texts around at the time, and they did everything they could to justify C's reputation as a difficult language to... |
Forum: C++ Nov 25th, 2006 |
| Replies: 13 Views: 4,673 Well it's still available in print, so if somebody suggested to Prentice Hall that they might like to make it available for free on line, I suppose they might think that they had heard of better... |
Forum: C++ Nov 25th, 2006 |
| Replies: 13 Views: 4,673 As any veteran could tell you, the real "bible" for C programmers was "K & R" (abbreviation), published many years ago by Prentice Hall. |
Forum: C++ Nov 24th, 2006 |
| Replies: 8 Views: 3,188 Well in any normal program the variables will have been declared long before any call is made to f. Therefore the stuff which gets pushed onto the stack will be copies (ie values of) the original... |
Forum: C++ Nov 24th, 2006 |
| Replies: 13 Views: 4,673 I wonder if OP means he is reading some source code with his physical eyes, and wants to know what the equivalent of BASIC's goto is. If so, its:
go label
line 1
line 2
line 3
label: |
Forum: C++ Nov 24th, 2006 |
| Replies: 3 Views: 2,393 In theory all you've got to do is use the decimal as the numerator, and then count up the number of digits in that numerator before putting a 1, followed by the same number of zeros on the bottom. So... |
Forum: C++ Nov 24th, 2006 |
| Replies: 8 Views: 3,188 Maybe I'm being thick, but I can't see any way of passing by reference except by passing a pointer. After all, if you want to write a value back to the original variable, you have got to know... |
Forum: C++ Nov 22nd, 2006 |
| Replies: 7 Views: 1,285 |
Forum: C++ Nov 21st, 2006 |
| Replies: 7 Views: 1,285 Don't see the problem. As you say, the width of each rectangle will be r/n, and presumably you will be going round a loop to calculate the area of each rectangle. If i is the index in a for loop,... |