User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 401,458 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,065 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.
Views: 2415 | Replies: 1
Reply
Join Date: Sep 2003
Location: deep withing 100100010100
Posts: 200
Reputation: camelNotation is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
camelNotation's Avatar
camelNotation camelNotation is offline Offline
Posting Whiz in Training

problems wid cpp files

  #1  
Oct 9th, 2003
Hello.I have been using Microsoft Visual Studio 2000 enterprise edition and I'm having a problem with linking files.I have saved a file named as "class declaration.h" by default and another named as "cppfile.cpp" by default.Let me tell you how I actually started this.First I created a new project workspace and then a c++ header file.I saved the header file ( my compiler or vc++6 saves header files as .h by default not .hpp) and opened a c++ source file.I saved the source file too and then compiled and got only 1 error saying that my .h file didn't exit.I have tried all names like "class declaration" and "classdeclaration" etc but it doesn't work.I know file namea are case-sensitive but I don't know about whitespaces.Note that I have not installed visual foxpro or interdev... :eek: and what does the " erro spawning file" message mean?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2003
Location: San Diego, CA, USA
Posts: 75
Reputation: Valmian is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
Valmian Valmian is offline Offline
Junior Poster in Training

Re: problems wid cpp files

  #2  
Oct 9th, 2003
I used MVS .net a bit and from that experience here are my suggestions:
1. Save files as "class_declaration.h" and "cppfile.cpp" in the same directory
2. Add both files to the project
3. When including class_declaration.h type
#include "class_declaration.h"
4. In your header file (class_declaration.h) start it with
#ifndef _class_declaration
#define _class_declaration
and end with
#endif
This will lower the chances of overflow by making sure the file is included only once and has no overloads etc.
5. Make sure the anything you refer to has a prototype in the header (just in case)
6. Make sure no other application is reading your file while you are trying to compile (that would explain your "spawning error"
Hope that helps..
Ilya
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 1:26 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC