Dev-c%2b%2b Says It Cant Save My File

Dev-c%2b%2b Says It Cant Save My File Rating: 3,7/5 3003 reviews

What is Dev-C++?
Dev-C++, developed by Bloodshed Software, is a fully featured graphical IDE (Integrated Development Environment), which is able to create Windows or console-based C/C++ programs using the MinGW compiler system. MinGW (Minimalist GNU* for Windows) uses GCC (the GNU g++ compiler collection), which is essentially the same compiler system that is in Cygwin (the unix environment program for Windows) and most versions of Linux. There are, however, differences between Cygwin and MinGW; link to Differences between Cygwin and MinGW for more information.

Main.cpp and the.dev file both have the exact same thing inside them except the.dev file has Project at the very top. Also i dont have a.layout file in any of my other programs. EDIT: Dev-C would be the same as wxDev-C. They both expect to see files with relative directories in the same folder as the executable. This is because they change the PATH variable of the command shell for the instance that it is running from.

Go to the 'Project' menu and select 'New File'. Note that Dev-C will not ask for a filename for any new source file until you attempt to: Compile Save the project Save the source file Exit Dev-C You can add pre-existing source files one of two ways: Go to the 'Project' menu and select 'Add to Project' OR. When you do this, Dev-C will ask you where you want to save the code file and what name to call it, if the file hasn't already been saved. You can call the file anything. I called mine PA1 and saved it as main.cpp in my EECS 311 code directory, because this is the file with the main function. This dialogue is really annoying to Dev C user in windows. Here i got some ideas to fix it. Follow the procedure given below. First of all open the task manager. To open the task manager press Ctrl + Shift + Esc. Now you can see task manager. On the task manager click on File, press Ctrl and click on New task at the same time. .c: C implementation file.hpp: C header file.cpp: C implementation file; See how clear that is? Building on that, once you start including multiple files in your project, you should have some sort of directory structure. Here is what I use; it's far from the only way to do it, but in my experience, it seems to be one of the most effective. Go to the 'File' menu and select 'New Source File' (or just press CTRL+N) OR; Go to the 'Project' menu and select 'New File'. Note that Dev-C will not ask for a filename for any new source file until you attempt to: Compile; Save the project; Save the source file; Exit Dev-C; You can add pre-existing source files one of two ways.

Click picture to enlarge.

Bloodshed!?
I'll be the first to say that the name Bloodshed won't give you warm and fuzzies, but I think it's best if the creator of Bloodshed explains:

First I would like to say that I am not a satanist, that I hate violence/war and that I don't like heavy metal / hard-rock music. I am french, but I do know the meaning of the 'Bloodshed' word, and I use this name because I think it sounds well. If you are offended by the name, I am very sorry but it would be a big mess to change the name now.

There's also a reason why I keep the Bloodshed name. I don't want people to think Bloodshed is a company, because it isn't. I'm just doing this to help people.

Here is a good remark on the Bloodshed name I received from JohnS:
I assumed that this was a reference to the time and effort it requires of you to make these nice software programs, a la 'Blood, Sweat and Tears'.

Peace and freedom,

Colin Laplace

Getting Dev-C++
/nokia-c3-security-code-unlock-software-free-download.html. The author has released Dev-C++ as free software (under GPL) but also offers a CD for purchase which can contain all Bloodshed software (it's customizable), including Dev-C++ with all updates/patches.

Link to Bloodshed Dev-C++ for a list of Dev-C++ download sites.

You should let the installer put Dev-C++ in the default directory of C:Dev-Cpp, as it will make it easier to later install add-ons or upgrades.

Using Dev-C++
This section is probably why you are here.

All programming done for CSCI-2025 will require separate compilation projects (i.e. class header file(s), class implementation file(s) and a main/application/client/driver file). This process is relatively easy as long as you know what Dev-C++ requires to do this. In this page you will be given instructions using the Project menu choice. In another handout you will be given instructions on how to manually compile, link and execute C++ files at the command prompt of a command window. See here.

Step 1: Configure Dev-C++.
We need to modify one of the default settings to allow you to use the debugger with your programs.

  • Go to the 'Tools' menu and select 'Compiler Options'.
  • In the 'Settings' tab, click on 'Linker' in the left panel, and change 'Generate debugging information' to 'Yes':
  • Click 'OK'.

Step 2: Create a new project.
A 'project' can be considered as a container that is used to store all the elements that are required to compile a program.

  • Go to the 'File' menu and select 'New', 'Project.'.
  • Choose 'Empty Project' and make sure 'C++ project' is selected.
    Here you will also give your project a name. You can give your project any valid filename, but keep in mind that the name of your project will also be the name of your final executable.
  • Once you have entered a name for your project, click 'OK'.
  • Dev-C++ will now ask you where to save your project.

Step 3: Create/add source file(s).
You can add empty source files one of two ways:

  • Go to the 'File' menu and select 'New Source File' (or just press CTRL+N) OR
  • Go to the 'Project' menu and select 'New File'.
    Note that Dev-C++ will not ask for a filename for any new source file until you attempt to:
    1. Compile
    2. Save the project
    3. Save the source file
    4. Exit Dev-C++

You can add pre-existing source files one of two ways:
  • Go to the 'Project' menu and select 'Add to Project' OR
  • Right-click on the project name in the left-hand panel and select 'Add to Project'.
EXAMPLE: Multiple source files
In this example, more than 3 files are required to compile the program; The 'driver.cpp' file references 'Deque.h' (which requires 'Deque.cpp') and 'Deque.cpp' references 'Queue.h' (which requires 'Queue.cpp').

Step 4: Compile.
Once you have entered all of your source code, you are ready to compile.

  • Go to the 'Execute' menu and select 'Compile' (or just press CTRL+F9).

    It is likely that you will get some kind of compiler or linker error the first time you attempt to compile a project. Syntax errors will be displayed in the 'Compiler' tab at the bottom of the screen. You can double-click on any error to take you to the place in the source code where it occurred. The 'Linker' tab will flash if there are any linker errors. Linker errors are generally the result of syntax errors not allowing one of the files to compile.

Once your project successfully compiles, the 'Compile Progress' dialog box will have a status of 'Done'. At this point, you may click 'Close'.

Step 5: Execute.
You can now run your program.

  • Go to the 'Execute' menu, choose 'Run'.
Note: to pass command-line parameters to your program, go to the 'Execute' menu, choose 'Parameters' and type in any paramaters you wish to pass.

Disappearing windows
If you execute your program (with or without parameters), you may notice something peculiar; a console window will pop up, flash some text and disappear. The problem is that, if directly executed, console program windows close after the program exits. You can solve this problem one of two ways:

  • Method 1 - Adding one library call:
    On the line before the main's return enter:
    system('Pause');
  • Method 2 - Scaffolding:
    Add the following code before any return statement in main() or any exit() or abort() statement (in any function):
    /* Scaffolding code for testing purposes */
    cin.ignore(256, 'n');
    cout << 'Press ENTER to continue.'<< endl;
    cin.get();
    /* End Scaffolding */
    This will give you a chance to view any output before the program terminates and the window closes.
  • Method 3 - Command-prompt:
    Alternatively, instead of using Dev-C++ to invoke your program, you can just open an MS-DOS Prompt, go to the directory where your program was compiled (i.e. where you saved the project) and enter the program name (along with any parameters). The command-prompt window will not close when the program terminates.

For what it's worth, I use the command-line method.

Step 6: Debug.
When things aren't happening the way you planned, a source-level debugger can be a great tool in determining what really is going on. Dev-C++'s basic debugger functions are controlled via the 'Debug' tab at the bottom of the screen; more advanced functions are available in the 'Debug' menu.

Using the debugger:
The various features of the debugger are pretty obvious. Click the 'Run to cursor' icon to run your program and pause at the current source code cursor location; Click 'Next Step' to step through the code; Click 'Add Watch' to monitor variables.
Setting breakpoints is as easy as clicking in the black space next to the line in the source code.
See the Dev-C++ help topic 'Debugging Your Program' for more information.

Dev-C++ User F.A.Q.

Why do I keep getting errors about 'cout', 'cin', and 'endl' being undeclared?
It has to do with namespaces. You need to add the following line after the includes of your implementation (.cpp) files:

How do I use the C++ string class?
Again, it probably has to do with namespaces. First of all, make sure you '#include <string>' (not string.h). Next, make sure you add 'using namespace std;' after your includes.

Example:

That's it for now.
I am not a Dev-C++ expert by any means (in fact, I do not teach C++ nor use it on a regular basis), but if you have any questions, feel free to email me at jaime@cs.uno.edu

Dev-c 2b 2b Says It Cant Save My File Folder

Happy coding!

Dev-c%2b%2b Says It Cant Save My File

It can be frustrating when you're using a computer program and can't save a file that you're creating or modifying. Let's look at some of the common reasons why you might not be able to save a file.

You haven't made any changes yet

Some programs will not give you the Save option until you make changes to the document you have open. If the 'Save' option is not available (grayed out in the file menu), this usually indicates that the file is unmodified, so saving it would have no effect. Make changes to the file and try again.

Solution

In the file menu, use the Save As… option to save the file as a new file name or to another folder.

The file is marked as read-only

Every file on your computer can have special file attributes. One of these special attributes is Read-only. If a file has the read-only attribute, the operating system will try to prevent you from changing the file.

For example, opening an e-mail attachment using some e-mail programs open the attachment as a read-only file. In a situation like this, if you make changes to the file, you can't save them.

Solution 1

Un-set the Read-only attribute on the file by following the steps below.

  • Locate your file in the File Explorer.
  • Right-click the file.
  • Select Properties.
  • Under the General tab, in the Attributes section, uncheck the Read-Only check box.
  • Click OK.

You should now be able to save changes to the file.

Solution 2

If you cannot change the Read-only attribute, try using the Save As… option to save the file to another location on the computer, such as your desktop. This file will not have the read-only attribute, so you can edit it and save your changes.

The file is on a read-only medium

If the file you opened is on a read-only medium like a CD-ROM or DVD-ROM, you cannot make changes and save them to the original file.

Solution

Open the file and Save as… to a new location on a writable medium such as your hard drive. You can then save your changes to the new file.

Insufficient permissions

Individual files and folders can be configured to grant write permission only to certain users or groups. If you try to save changes to a file and see the message 'Access is denied,' then you do not have permission to write to the file.

Solution

If you are the administrator of your computer, you can change the permissions yourself by following the steps below.

  • Locate the file in File Explorer and right-click it.
  • Choose Properties.
  • Select the Security tab.
  • Under Group and user names, highlight your user name by clicking it to display your permissions for the file in the Permissions for… box below.
  • Click the Edit… button to open a window where you can change permissions.
  • In this new window, highlight your user name by clicking on it.
  • Check/uncheck the appropriate check boxes, making sure that no permissions are Denied, and that all permissions are Allowed.
  • Click OK to close the window. Click OK again to close the Properties window.

If you cannot change the permissions because you are not the administrator, contact your IT department or system administrator to request write permission to the file.

Insufficient disk space

If the location you are saving the file does not have sufficient disk space to store the file, the operation fails.

Solution

Free up some space on the disk, or Save as…web download aplikasi mac gratis to another location that has enough free space. To determine the available space, see: How to find how much hard drive space is available.

No connection when saving to a network drive

Dev-c 2b 2b Says It Cant Save My File Electronically

If you're saving to a network drive or another online drive (e.g., the cloud storage) and have no Internet or network connection, you cannot save the file. Make sure you have a good connection by trying to open another file in the same location.

Disk is write protected

Removable disks like floppy diskettes and USBflash drives can be set to write protected. If a disk or drive is write protected, you cannot save any file or changes to a file until the write protection is disabled.

Dev-c 2b 2b Says It Cant Save My File How Do I

Bad drive

Finally, if none of the above reasons apply, you may be encountering problems because of a bad disk or drive. Make sure this is not the problem by trying to save the file to an alternate location using the Save As option. If this works, the file may be corrupt, or there may be a malfunction in your disk drive.

Dev-c 2b 2b Says It Cant Save My Files

Additional information

  • See the save definition for further information and related links.