Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Run-time Check failure

Run-time Check failure

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelptutorial
4 Posts 4 Posters 1 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.
  • W Offline
    W Offline
    wanglei1980
    wrote on last edited by
    #1

    Hello everyone, i have met a "Run-time Check failure" error when i use a WCHAR buffer to get sting read from a file. "Run-time Check failure #2-stack around the variable tmp was corrupted", and "tmp" is a WCHAR variable. can you tell me the reason to bring this error and how to resolve it.

    N T H 3 Replies Last reply
    0
    • W wanglei1980

      Hello everyone, i have met a "Run-time Check failure" error when i use a WCHAR buffer to get sting read from a file. "Run-time Check failure #2-stack around the variable tmp was corrupted", and "tmp" is a WCHAR variable. can you tell me the reason to bring this error and how to resolve it.

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      wanglei1980 wrote:

      "Run-time Check failure #2-stack around the variable tmp was corrupted", and "tmp" is a WCHAR variable. can you tell me the reason to bring this error and how to resolve it.

      This[^] could be the reason though not sure. :~


      Nibu thomas A Developer Programming tips[^]  My site[^]

      1 Reply Last reply
      0
      • W wanglei1980

        Hello everyone, i have met a "Run-time Check failure" error when i use a WCHAR buffer to get sting read from a file. "Run-time Check failure #2-stack around the variable tmp was corrupted", and "tmp" is a WCHAR variable. can you tell me the reason to bring this error and how to resolve it.

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        wanglei1980 wrote:

        "Run-time Check failure #2-stack around the variable tmp was corrupted", and "tmp" is a WCHAR variable.

        While Creating any varible specially Visual Studio .net 2003 and above, give default value to variable other wise you will always see this type of error!

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

        1 Reply Last reply
        0
        • W wanglei1980

          Hello everyone, i have met a "Run-time Check failure" error when i use a WCHAR buffer to get sting read from a file. "Run-time Check failure #2-stack around the variable tmp was corrupted", and "tmp" is a WCHAR variable. can you tell me the reason to bring this error and how to resolve it.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          I'm not sure see Here[^] maybe it is some helpful to you_**


          **_

          whitesky


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups