Skip to content

A little problem for print #11

Open

Description

@RQDYGSN

Error:

word2vec.h:319:48: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("training %d sentences\n", n_sentences);
^
word2vec.h: In instantiation of ‘int Word2Vec::load(const string&) [with String = std::basic_string; std::string = std::basic_string]’:
main.cc:130:27: required from here
word2vec.h:418:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("%d words loaded\n", n_words);

Solution:

  • Word2vec line 319: printf("training %ld sentences\n", n_sentences);
  • Word2vec line 418: printf("%ld words loaded\n", n_words);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions