www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/08:49:04

Xref: news2.mv.net comp.os.msdos.djgpp:6854
From: edkiser AT jaxnet DOT com (M. Edward Kiser)
Newsgroups: comp.os.msdos.djgpp
Subject: Standard C++ Library?
Date: Tue, 06 Aug 1996 04:09:58 GMT
Organization: Southeast Network Services, Inc.
Lines: 59
Message-ID: <4u6h24$ncl@jaxnet.southeast.net>
Reply-To: edkiser AT jaxnet DOT com
NNTP-Posting-Host: ts2-003.southeast.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

/*
Can somebody tell me what is wrong here? As far as I can tell all this
code is good. The errors out of algobase.h are especially puzzling...

This might be a problem in GCC, not in DJGPP.

Post here or mailto edkiser AT jaxnet DOT com
*/

#ifndef __COMPLEX__
#include <complex>
#endif
#ifndef __VECTOR__
#include <vector>
#endif

typedef complex<float> cplx;
typedef vector<cplx> vec;

int main(void)
{
  cplx a(3.,2.);
  cplx b(1.2,0.3);
  vec v;

  for (int i=0; i<20; i++)
  { v.push_back(a);
    a*=b;
  }

  for (vec::iterator ii=v.begin(), ii!=v.end(); ii++)
  { cout << (*ii) << "\n";
  }

  return 0;
};

/*
complexu.cpp: In function `int main()':
complexu.cpp:22: redeclaration of `class complex<float> * ii'
complexu.cpp:22: `class complex<float> * ii' previously declared here
complexu.cpp:22: parse error before `!='
complexu.cpp:22: parse error before `)'
e:/djgpp/lang/cxx/algobase.h:153: `result' undeclared (first use this
function)
e:/djgpp/lang/cxx/algobase.h:153: (Each undeclared identifier is
reported only once
e:/djgpp/lang/cxx/algobase.h:153: for each function it appears in.)
e:/djgpp/lang/cxx/algobase.h:153: `first' undeclared (first use this
function)
e:/djgpp/lang/cxx/algobase.h:155: confused by earlier errors, bailing
out
*/

--------
Ed Kiser (edkiser AT jaxnet DOT com)
"The great epochs of our lives are at the points where
 we rebaptize our badness as the best in us." -- Nietzsche

- Raw text -


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