🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2461

Re: void* type

#2461
From: John E. Davis
Date: Tue, 02 Apr 1996 02:00
22 lines
1261 bytes
On 27 Mar 1996 18:03:37 -0600, Lawrence Kirby <fred@genesis.demon.co.uk>
wrote:
 :  >: yang@math.umass.edu (Huayong Yang) writes:
 :  >
 :  >: >void Swap(void** p1, void** p2)
[...]
 : There isn't a simple generic solution to this problem.

I think it is an example of a ridiculous question.  What is wrong with this:

    Some_Type *a, *b;
       .
       .
    if (some_condition_has_occured_where_a_and_b_need_swapped)
      {
         Some_Type *tmp;
	 tmp = a; a = b; b = tmp;
      }
-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis
Technical Details
Message-ID: <4jq1nk$a8h@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4iepre$ag7@solutions.solon.com> <4ii34g$nlp@solutions.solon.com> <4ja3qf$p9b@solutions.solon.com> <4jcl0p$a97@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: davis@space.mit.edu (John E. Davis)
Newsgroups: comp.lang.c.moderated
Subject: Re: void* type
Date: 1 Apr 1996 20:00:20 -0600
Organization: Center for Space Research
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4jq1nk$a8h@solutions.solon.com>
References: <4iepre$ag7@solutions.solon.com> <4ii34g$nlp@solutions.solon.com> <4ja3qf$p9b@solutions.solon.com> <4jcl0p$a97@solutions.solon.com>
Reply-To: davis@space.mit.edu
NNTP-Posting-Host: solutions.solon.com
X-Newsreader: slrn (0.8.7.1 UNIX)