•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 455,973 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,819 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 3278 | Replies: 5
![]() |
•
•
Join Date: Aug 2004
Location: Kent Washington
Posts: 22
Reputation:
Rep Power: 5
Solved Threads: 0
I am using Microsoft Visual C++, and when i try and compile something i either can't or i get " Cannot compile the file in 'C\Program Files\Microsoft Visual Studio\Common\tools\H1.h';
no compile tool is associated with the file extension"
I have placed it in so many different places and each time i get this (but with a different area were it was found but cannot compile)
Also when i do it the way the guide tells me to.
"Let's look at a simple example to understand the elements of a program a little better. Start by creating a new project from the range of alternatives offered on the Projects tab when you click the New... item in the File menu. When the dialog appears, select Win 32 Console Application and name the project Ex1_01; then click on OK." "Next, the Console Application dialog appears. We'll start from the very basic project structure, so choose An empty project, and click on the Finish button. " "The New Project Information tells you about the project you're about to create; it should look something like this:" "The project directory at the foot of the screen may be slightly different on your machine; everything else should be identical. Once your happy with it, click on OK.
We'll start by entering the following program as a new source file, so click the leftmost icon on the standard toolbar, , to create a new text file into which you can type the code." (then code) "Once you have keyed it in, save it as Ex1_01.cpp using the File menu Save As... option. The Save As dialog will offer to save it in the project directory that you just created and, since this file is part of that project, that's the best place for it. Since you have now identified the file by its extension as a file containing C++ code, the keywords in the code will gain their colors. You will be able to see if you have entered Int where you should have entered int, since the two will bedifferent colors" right here is my problem. I do not get channged colors. Can any one help me please. Its really starting to annoy me. I have tried reinstalling it, uninstalling and then installing again, and none of it changes this.
Please help
PS: im relearning since i quit doing C++ some time ago and ican't remember anything (well didn't know much)
But my code gives me 5 errors and i have no idea where they are
no compile tool is associated with the file extension"
I have placed it in so many different places and each time i get this (but with a different area were it was found but cannot compile)
Also when i do it the way the guide tells me to.
"Let's look at a simple example to understand the elements of a program a little better. Start by creating a new project from the range of alternatives offered on the Projects tab when you click the New... item in the File menu. When the dialog appears, select Win 32 Console Application and name the project Ex1_01; then click on OK." "Next, the Console Application dialog appears. We'll start from the very basic project structure, so choose An empty project, and click on the Finish button. " "The New Project Information tells you about the project you're about to create; it should look something like this:" "The project directory at the foot of the screen may be slightly different on your machine; everything else should be identical. Once your happy with it, click on OK.
We'll start by entering the following program as a new source file, so click the leftmost icon on the standard toolbar, , to create a new text file into which you can type the code." (then code) "Once you have keyed it in, save it as Ex1_01.cpp using the File menu Save As... option. The Save As dialog will offer to save it in the project directory that you just created and, since this file is part of that project, that's the best place for it. Since you have now identified the file by its extension as a file containing C++ code, the keywords in the code will gain their colors. You will be able to see if you have entered Int where you should have entered int, since the two will bedifferent colors" right here is my problem. I do not get channged colors. Can any one help me please. Its really starting to annoy me. I have tried reinstalling it, uninstalling and then installing again, and none of it changes this.
Please help
PS: im relearning since i quit doing C++ some time ago and ican't remember anything (well didn't know much)
But my code gives me 5 errors and i have no idea where they are
#include <iostream.h>
int divide (int a, int b)
{
int r;
r=a/b;
return (r);
}
int main ()
{
int grade, age;
char name[20];
cout<<"Welcome, what is ur name?: ";
cin>>name;
cout<<"you entered: "<<name;
cout>>"How old are you <<name<< " ?:\n" ;
cin>>age;
cout>> "so what grade are you in?: ";
cin>> grade;
cout<< "Ok so if i divide ur grade by ur age then I will get" << divide (age,grade) << "right \n";
return 0;
}•
•
Join Date: Jun 2004
Location: Marin, CA, USA
Posts: 434
Reputation:
Rep Power: 5
Solved Threads: 10
I always use their wizzard (file/new/...) to create a basic project (like a "Hello World" project) because its easier than trying to start one from scratch.
But have you tried creating a .cpp file rather than .h; generally you compile .c or .cpp files and they include .h files, you don't compile the .h directly.
But have you tried creating a .cpp file rather than .h; generally you compile .c or .cpp files and they include .h files, you don't compile the .h directly.
•
•
Join Date: Aug 2004
Location: Kent Washington
Posts: 22
Reputation:
Rep Power: 5
Solved Threads: 0
•
•
Join Date: Jun 2004
Location: Marin, CA, USA
Posts: 434
Reputation:
Rep Power: 5
Solved Threads: 10
Yeah you push the 'new' button, type in some stuff, and save it as a .h or .cpp. Remember to add it to the project (easy way: right click on text region and select 'add to project').
OR
Use file/new and select source file and it MAKES you give it a file name and I think it adds it to the project for you.
OR
Use file/new and select source file and it MAKES you give it a file name and I think it adds it to the project for you.
•
•
Join Date: Aug 2004
Location: Kent Washington
Posts: 22
Reputation:
Rep Power: 5
Solved Threads: 0
thanks for the help
Lothia, Low-thee-a, I am a guy, not a girl. I invented this name. www.onrpg.com This is a great free gaming website. If you wanna have a convo, or talk about stuff My Email Address is.... :D
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Java Problem with running program (Java)
- Graphics Card problem (Monitors, Displays and Video Cards)
- graphics / compiler problem (Java)
- Major XP Problem: Error Loading Operating System... (Windows NT / 2000 / XP / 2003)
- PLEASE HELP: Windows XP Major problem (Windows NT / 2000 / XP / 2003)
- Major IE Problem (Web Browsers)
- Major Problem (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: New to C++ Pointers and need help with identifying where the errors are
- Next Thread: Creating viruses with c or c++


Linear Mode