Home

* Frank Birbacher:
> Hi!
>
> Alf P. Steinbach schrieb:
>> * arnuld:
>>> int swap_values(int* ip, int* jp)
> [snip]
>> Yes, you can (1) make those pointers point to const int, as you did in
>> previous exercise,
>
> No, you cannot. The swap function actually needs to modify the values in
> order to swap them.

Yes, sorry.


>> and (2) implement the function in terms of std::swap.
>
> Which is hopefully what the excercise leads to after introducing references.

Would you also forbid use of std::cout?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

previous
next

Re: Looking for C++ Professionals (Bangalore)
Re: status of Programming by Contract (PEP 316)?
embedding python..
Re: FCGI app reloading on every request
Re: Returning (char *) from a function - memory problem
pozycjonowanie stron
forum pokerowe
Mariquita
paraprotex opinie
zaproszenia ślubne