www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/01/15:59:58

Message-ID: <33417135.1856@geocities.com>
Date: Tue, 01 Apr 1997 22:33:57 +0200
From: Deltaman <deltaman AT geocities DOT com>
Reply-To: deltaman AT swipnet DOT se
MIME-Version: 1.0
To: DJGPP ML <djgpp AT delorie DOT com>
Subject: String comparing problem

Hi!

Thanx to all for your help with my multiple file problem. Now I've got
another problem :)

I have a program to exchange special HTML-letters to plain text i.e
&#233 to =E9=82 and so on.

In the beginner I set a string called 'test_string'

char test_string[5] ;

I do some other code that puts values into test_string character by
character.
I have a test line that prints the contents of a string to the screen.
Its output is:

from the lines:

printf(test_string);
printf("<--End of test string");

I get the output:

#197; <--End of test string

When I checks if test_string is equal to a special character:

if (test_string =3D=3D "#197; ") printf("I should see this");
if (test_string =3D=3D "#197;")  printf("or this");

...nothing happens.

What do I do wrong?

Thanx in advance!
------------------------------------------------------------------------
mailto:deltaman AT swipnet DOT se

Please visit my homepage at http://www.geocities.com/TimesSquare/8240
------------------------------------------------------------------------
______  _______        _______ _______ _______ _______ __   _
 |     \ |______ |         |    |_____| |  |  | |_____| | \  |
 |_____/ |______ |_____    |    |     | |  |  | |     | |  \_|

- Raw text -


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