Forum: C Aug 17th, 2004 |
| Replies: 34 Views: 8,538 i++: do the calculation or do the comparison before the i's value is increment.
++i: increment the i's current value by 1 before doing the calculation or doing the comparison.
Hence, using in for... |
Forum: C Jun 15th, 2004 |
| Replies: 7 Views: 6,553 Sorry! I take back my words. In the above case it is wrong since the above array is not allocated in the heap(unless using new operator), so you are 100% correct. (I messed up with Java since array... |
Forum: C Jun 15th, 2004 |
| Replies: 7 Views: 6,553 Yes. Absolutely, you are right about local data goes out of scope, but the value is always correct since the pointer is going out of scope, but the memory, which pointer pointed to is still there... |
Forum: C Jun 15th, 2004 |
| Replies: 7 Views: 6,553 To Kalachylde: It does not perform what we are expected to because of two reasons: it will return integer instead of array of integer, and return graph[6][6] means creating one new array of integer... |
Forum: C Jun 7th, 2004 |
| Replies: 7 Views: 6,553 Hi all,
What should I write for function signature in order to return this 6X6 array without compiler error? I tried to use int* getGraph(), but it did not work.
Thanks for your help.
... |
Forum: C May 13th, 2004 |
| Replies: 8 Views: 45,325 Hi Dave,
What is the %n used for in sscanf(ptr, "%3d%n", &value, &i)? Thanks. |