www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/14/22:02:59

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Derek" <djny AT flashmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: strings
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <LQyS7.2291$cd.473157@news.uswest.net>
Date: Fri, 14 Dec 2001 20:46:51 -0600
NNTP-Posting-Host: 216.161.131.199
X-Trace: news.uswest.net 1008384427 216.161.131.199 (Fri, 14 Dec 2001 20:47:07 CST)
NNTP-Posting-Date: Fri, 14 Dec 2001 20:47:07 CST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I can't seem to get strings to work with DJGPP. I'm sure there's a simple
solution. Could someone please point me in the right direction?

Here's what I tried:

#include <iostream>
#include <string.h>

int main()
{
    string word = "test";
    cout << word << endl;
    return 0;
}

When I compile it, I get:

Error: 'string' undeclared (first use this function)

I tried many things and nothing worked. This is mind boggling. Would you
mind pointing out what I'm doing wrong?

Thanks,

Derek


- Raw text -


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