Works On Windows, Fails On Linux - Need Some Help, Thanks!

Hi,

I should be done with the engine update by end of this week.
Today I rewrote the dictionary word lookup converting it from char to string.
I works properly on Windows 10, but does not work on Linux(Kubuntu).
(no compile warnings on Linux, the compare of user word and dictionary word is not working)

You can see the code at below URL link:
https://pastebin.com/g2Uw2h8G

Not sure how to fix the above to work on both Windows and Linux.
Any help would be appreciated, this is the last big task in this engine update…
Thanks!

Jesse
www.FallenAngelSoftware.com

Hi Again,

You can download the current project below:
http://fallenangelsoftware.com/stuff/files/GT-R_Engine/source/GT-R_Engine.zip

Thanks!

Jesse

Hello again,

This could be literally anything.
Maybe compiler doesn’t support operator== for string ?

Try

if(strcmp(userWord.c_str(), data.c_str()) == 0) {
}

Simple Working Example to try.

#include <iostream>
#include <sstream>

int main() {

    std::string userWord = "World";

    std::stringstream ss;
    ss << "Hello\n" << "World\n";

    std::string data;
    while ( std::getline(ss, data)) {
        if (userWord == data) {
            std::cout << "Found Word \n";
        }
    }
    return 0;
}