delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/07/22:13:45

Date: Sun, 7 May 1995 20:51:38 -0400 (EDT)
From: Kimberley Burchett <OKRA AT max DOT tiac DOT net>
Subject: is it me?
To: DJGPP Mailing List <djgpp AT sun DOT soe DOT clarkson DOT edu>

This seems to be a problem with the C++ compiler.  I'd cc it to the gcc 
people, but I forgot the address.

	typedef float Block[32][32];
  
	class Foo
	{
	public:
	    void Calc(Block & result)
	    {
	        Calc(result);
	    }
	};

yields this error:

  test.cc: In method `void Foo::Calc(float (&)[32][32])':test.cc:11:
  bad argument 1 for function `void Foo::Calc(float (&)[32][32])' 
  (type was float (*)[32])

while this works fine:

	void Foo(Block & result)
	{
	    Foo(result);
	}

Is this some C++ lore I don't know about?


Grudgingly using pointers,
Kimberley

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019