www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/18/09:46:32

Xref: news2.mv.net comp.os.msdos.djgpp:6120
From: Andy Eskilsson <flognat AT fukt DOT hk-r DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Getting a "unresolved symbol new(int, void)" when trying out new grounds..
Date: 18 Jul 1996 10:21:47 +0200
Organization: Telelogic AB, Sweden
Lines: 41
Sender: x-aes AT glare
Message-ID: <kswx02yns4.fsf@fukt.hk-r.se>
Reply-To: x-aes AT telelogic DOT se
NNTP-Posting-Host: glare.telelogic.se
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am trying to get started with a little modern hacking, using the
string and listclasses that come with gcc, but when compiling the
following code (I use gpp) I get a message looking like:

"unresolved symbol new(int, void)"

Nothing about missing files or so.I managed to nuke the docs, so I
haven't had the possibility to consult them, any hints? ideas what I
have done wrong? 

	/Andy

#include <dirent.h>
#include <list.h>
#include <strclass.h>

int getDirectory(char *dir, list<String> *filelist) {
  DIR *directory;
  dirent *entry;
  String name;
  __opendir_flags=__OPENDIR_PRESERVE_CASE||__OPENDIR_FIND_HIDDEN;
  directory=opendir(dir);
  while( entry = readdir (directory) )  {
    name=entry->d_name;
    filelist->push_front(name);
  }
  closedir(directory);
}  

int main(int argc, char *argv[]) {
  list<String> filelist;
  getDirectory(".", &filelist);
  cout << filelist.size() << endl;
}


-- 
  Hi I am an alien .sig, and at the   |  Unsolicited commercial email is 
 moment I am having sex to your mind, | subject to an archival fee of $400.
 by looking at your smile I can see   | See www.fukt.hk-r.se/~flognat/mail
        that you like it.             |          for more info.

- Raw text -


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