Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8129943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:30:10+00:00 2026-06-06T08:30:10+00:00

Got a problem which to me make no sense. So here goes: I have

  • 0

Got a problem which to me make no sense. So here goes:

I have a function that counts how many times a word appears in a file, thus this function return a integer (int). So on another function it uses the “counter”. Now for some reason it decided to start launching a stack smashing detected error. I had been testing it for 2 weeks the whole program and it worked to perfection. Now I get that error, which really makes no sense. What in the world is going on? And the error is right there, after the function has counter and it return, it launches the stack smashing detected error.

Edit:
I keep searching, and yes i get a stack smashing detected error when returning a int function. Any ideas? If i take that code out, it does not crash. Really i have no idea

Any suggestion?

Thanks…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:30:11+00:00Added an answer on June 6, 2026 at 8:30 am

    May I suggest compiling your program with debugging information and running it under Valgrind? See also this related question.

    If you need it, I have posted some hints on using Valgrind in an older answer of mine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a problem with calling a global function, which takes a pointer
Got a really frustrating problem that doesn't seem to make any sense. I'm trying
I've got a problem which you can look at here http://jsfiddle.net/dng2P/4/ If you click
Hi I have got a problem that I can't solve when compiling the android
I have problem which I want to draw a function graph with any input
I've got a problem which seems to be a real nut. I am using
I've got another problem (which might not be an issue in terms of coding
I've got a problem which is probably very easy to solve but I can't
Hello stackoverflow people! I've got a problem which I haven't been able to solve
Hy, I got an intersting problem which I stumbled upon. When I double-click a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.