0

Just installed new eclipse neon for c++ coding.

strdup() fails to be resolved, although I can see the function signature and describe when I'm looking for it using Ctrl+Space, same for strtok()

Deck::Deck(string the_deck, int n) {
  const char * tmp_deck = the_deck.c_str();
  char * c_deck = strdup(tmp_deck);
  char *token;
  token = strtok(c_deck, " ");
  while (token != NULL) {
    if (isdigit(token[0]))
        cards.push_back(new NumericCard(token));
    else
        cards.push_back(new FigureCard(token));
    token = strtok(NULL, " ");
}}

Error: Function 'strdup' could not be resolved

Tried this : Eclipse Method could not be resolved in a simple program C++ but it didn't help.

I'm using Win 10 OS with MinGW, also, everything is working fine on Visual Studio.

Attached Photo

Thanks.

Community
  • 1
  • 1
Philip L
  • 339
  • 1
  • 3
  • 14

0 Answers0