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

  • Home
  • SEARCH
  • 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 7168329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:45:30+00:00 2026-05-28T14:45:30+00:00

When I press the Debug button in Visual Studio 2010 Express. And build this

  • 0

When I press the Debug button in Visual Studio 2010 Express. And build this code

int main(int argc, char *argv[])
{
FILE * wFile;
float  wbuffer[] = { 1 , 2 , 3, 4};
wFile = fopen ( "myfile.bin" , "wb" );
fwrite (wbuffer , 1 , sizeof(wbuffer) , wFile );
fclose (wFile); 

/*BREAK POINT HERE*/
return 0;
}

Where does the myfile.bin go. I know where it goes when I run the program by double clicking on it. But if I’m debugging the file doesn’t appear in the projectName/debug directory.

Edit: Apparently this program will find the location. But it usually the same directory as your source files.

#include <stdio.h> 
#include <direct.h>
#define GetCurrentDir _getcwd

int main(int argc, char *argv[])
{
char cCurrentPath[FILENAME_MAX];

if (!GetCurrentDir(cCurrentPath, sizeof(cCurrentPath) / sizeof(TCHAR)))
 {
 return errno;
 }

cCurrentPath[sizeof(cCurrentPath) - 1] = '\0'; /* not really required */

printf ("The current working directory is %s", cCurrentPath);


}
  • 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-05-28T14:45:31+00:00Added an answer on May 28, 2026 at 2:45 pm

    It goes into what you have set as the working directory. If you right click the Project in the solution explorer and choose “Properties” -> “Configuration Properties” -> “Debugging” it will have a “Working Directory” input. It defaults to $(ProjectDir) which is the root folder for the project (you can open it from inside Visual Studio by right clicking on the project and choosing “Open Folder in Windows Explorer”).

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

Sidebar

Related Questions

#include <QtCore/QCoreApplication> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); a.setApplicationName(xxx); char bb[25]
I'm using Visual Studio 2010. When I change the code in my source file,
When I press F5 in Visual Studio 2008, I want Google Chrome launched as
I have an asp.net project in visual studio 2008 I press F5 and the
Here's a screenshot of how it looks before I press the green debug button.
I'm having a visual studio 2008 solution with asp.net 2.0/C# website. When I press
I have a view, and a button in this view. When I press this
In the question Why will Visual Studio 2005 not debug my javascript? I learned
Does anyone know why when I press the new button in Eclise Debug Configuration
If I press Ctrl + B that ought to give me ASCII code 2,

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.