Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Sprintf_s was not declared in this scope
Forum Updated to NodeBB v4.3 + New Features

Sprintf_s was not declared in this scope

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 7.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andell
    wrote on last edited by
    #1

    Hi, I need to use function sprintf_s and strcat_s functions. I have Qt 4.7.4 and Win7. Do you have any idea, how to remove this error message?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      These functions are non-standard part of Microsoft's C run time library. Include the relevant headers and build using Microsoft's compiler. You can probably also substitute snprintf.

      If you want to make this a Qt question, then you should be using QString. For generic C++ you should be using std::string.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved