View Full Version : unable to open include file....(c++)
lordoflife1
11-21-2005, 02:24 AM
hey guys i need help
Unable to open include file 'string.h
Unable to open include file 'iostream.h
any info..im a beginer so i dont know how to fix it :confused:
-thanks-
_panic_
11-21-2005, 03:02 PM
hey guys i need help
Unable to open include file 'string.h
Unable to open include file 'iostream.h
any info..im a beginer so i dont know how to fix it :confused:
-thanks-
are you trying to do this from visual studio? can you post the top of the file (the part with the #include lines) here in the forum?
lordoflife1
11-21-2005, 10:00 PM
ill put the entior thing up...not much im just starting
// C++ code tamplate
#include <iostream.h>
#include <string.h>
void main()
{
// code goes hear!!!!
}
its not disined to do any thing
_panic_
11-21-2005, 10:05 PM
just a quick note on the pedantic front, you return value from main should be an 'int', not 'void'. but that isn't causing your problem...
what is the name of the file you have this code in? it should have a .cpp extension. further, how is it that you are trying to build the code? can you describe that process? it will help in determining why you are seeing this problem.
lordoflife1
11-21-2005, 11:16 PM
the name is template.cpp i dont get what your asking?? the book says that all i have to comply it in cmd....im a real beginer........i need help
lordoflife1
11-21-2005, 11:38 PM
dude im a noob.....a 14 year old one
just so you know
FTPServerTools
11-22-2005, 04:23 AM
It depends on your compiler. You should basically set your include paths properly, then it will compile.
dasOp
11-22-2005, 01:49 PM
Um, are you writing C or C++?
iostream.h doesnt exist anymore, no standard c++ headers have .h at the end. and if it is c++, you either want <string> or <cstring> for the old C header.
_panic_
11-22-2005, 08:52 PM
the name is template.cpp i dont get what your asking?? the book says that all i have to comply it in cmd....im a real beginer........i need help
i need to you show me the line you type into cmd that gives you this error message. it is likely you need to include a '/I' options (which you should be able to find from your compiler documentation) pointing to the right files, but the advice below also holds, try removing the '.h' from the end of the filenames in your #include lines. they are no longer required and in some cases will generate the error you are seeing.
_panic_
11-22-2005, 08:54 PM
dude im a noob.....a 14 year old one
just so you know
no worries about being 14. we focus on what is real around here, and your age doesn't really matter. you should, however, tone down the whining (begging to be helped really won't get you anywhere). it is obvious you are a n00b from they way you are talking, i didn't need it pointed out to me :)
anyway, let me know how it is going after you echo the text you are typing into cmd.exe.
lordoflife1
11-23-2005, 06:57 PM
N:\Documents and Settings\Randall>c:\borland\bcc55\bin\bcc32.exe n:\pro\template
.cpp is what it shows befor i hit enter and the thing w/o .h didnt work........ill be playin half life
_panic_
11-24-2005, 09:49 AM
N:\Documents and Settings\Randall>c:\borland\bcc55\bin\bcc32.exe n:\pro\template
.cpp is what it shows befor i hit enter and the thing w/o .h didnt work........ill be playin half life
the error message you get is because bcc32.exe can't find the files iostream.h and string.h. you need to tell bcc32.exe how to find these files.
first, your're going to have to find the path to these files by searching for them on your computer. the are probably in c:\borland\... somewhere. second, you're going to have to use the /I option to bcc32.exe and include this path:
c:\borland\bcc55\bin\bcc32.exe /Ic:\path\to\includes template.cpp
i don't have documentation for bcc32.exe handy, so it *might* not be /I you need to use. you'll have to check your compiler documentation for how to specify "include header paths" if it doesn't work.
good luck!
lordoflife1
11-25-2005, 02:23 AM
o god
lordoflife1
11-25-2005, 02:32 AM
found it.....but theres a long list o boy............................................... .......
lordoflife1
11-25-2005, 02:40 AM
ok it dont work
lordoflife1
11-25-2005, 03:01 AM
it just brings me back to where i was....nowere
lordoflife1
11-25-2005, 03:33 AM
ill just give up on c++ and work on c
_panic_
11-26-2005, 01:02 PM
ok it dont work
if you'd like help, i need *much* more information than that. you should describe what you tried and what the result was. you should include commands you tried, error messages, etc. the more information you can include, the better.
just saying it doesn't work doesn't provide any information i can use to help you. getting help online is 2 parts helping yourself for every part someone helps you. you'll need to expend your own effort to figure this out. i can only give you guidance.
KRISH
02-01-2007, 09:28 AM
dude i think i can solve ur prob coz i just solved the same problem in my computer
please change the following... Options->Directories-> ***Change the "Include Directories" path to your C++ installed path (ie) if D:\TC is your c++ installed path then change "D\TC\INCLUDE" ***Change the "Library Directories" path to your C++ installed path (ie) if D:\BC is your c++ installed path then change "D:\BC\LIB"
I think it should work ;)
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.