Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hello codeproject, good day.

As silly as it seem to be, I do have the cource code but I cannot compile it, the software is working just fine, our teacher gave us the instruction of do the translation and compile it again, the problems is that I cannot do that, hope you can helpe with it. This is the source code:

The webpage where the sourcecode was taken is: http://www.dailyfreecode.com/DisplayArticle.aspx?MySyntaxId=1018[^]

just open it and you will see the sourcecode.


1) Visual Studio 2013 Original, I got this from the Store.
2) My progress:

I used the Visual Studio IDE Compiler but there are some errors that should not be, like this ones:

#include dir.h Error: it cannot possible to find the source file

And things like that.
Posted
Updated 10-Oct-15 11:12am
v6
Comments
PIEBALDconsult 10-Oct-15 15:31pm    
This a repost of: http://www.codeproject.com/Questions/1038299/How-do-I-open-a-c-file

The OP is having trouble figuring out how to use a compiler, but won't admit that the problem is him, not the code or the teacher who assigned it.
Member 11267069 10-Oct-15 15:37pm    
You got it.

The think is that to my teacher this is just a way to make us fail, I am a begginer, I know how to program in Visual Studio 2013 and furthermore, not in C or C++. thanks for your comments.
PIEBALDconsult 10-Oct-15 15:43pm    
It's not about your teacher. It's about _you_. _You_ need to learn how to use a compiler.
Member 11267069 10-Oct-15 16:13pm    
Ok, so then, could you please show me a place in wich one I can learn... because that is your point, isn`t ?

please share the link.
PIEBALDconsult 10-Oct-15 16:16pm    
You need to tell us which compiler you are using and what command you are issunig on the command-line and the compile-time errors you receive -- we can't begin tp help you until you do that. Do not create a new question, just use Improve question to add the necessary context and detail.

Do not repost the questions. They will not help you get the solution. You can improve your own questions to make them "sensible". If the problem was able to get solved, that easier, I'd provided you with the answer in that post.

The solution is in the hands of your teacher, why did he give you such a program in the first place? There is no solution, other than going back to your teacher and telling him that the program did not compile. He will try to help you out. If he cannot, I will repeat, go find someone, who teaches instead of just being a teacher.
 
Share this answer
 
Comments
Member 11267069 10-Oct-15 15:40pm    
You are right Sir, and excuse me for re-posting the question. Here you have the circumstances:

1) This was not the original teacher, he is like a back-up and he is unhappy for being teaching.

2) I do have an scholarship and If I fail the subject the school will take it away from me for good. (and obviously I do really need it)

3) You are right, I have no idea what to do with the source code, this is the first level and I am totally lost, I am just desperated, sorry if that bothered you.

Please try to be emphatic with my situation and try to remember when you used to be a begginer too. Thanks for reading.
PIEBALDconsult 10-Oct-15 15:47pm    
You need to stop sitting there saying "oh woe is me" and get going. Learn how to use the compiler. A successful person isn't one who sits waiting for people to give him things, it's one who goes out and gets things for himself. You _must_ be able to overcome whatever challenges are put in your way -- including sub-par teachers.
I didn't find a dir.h file with my installations of Visual Studio.
But Borland C/C++ has a dir.h and GCC that comes with MinGW has one.
It seems Visual Studio does not have a dir.h :

"
I think that ANSI C does not have any directory functions, hence no dir.h and no dirent.h in Microtosoft C. Borland Turbo C of around 1990 had dir.h. And, as you demonstrated, your linux C compiler does have dir.h.
Microsoft Windows (all versions) has system functions to manipulate and traverse directories. And you access them by #including <windows.h>.
To port a program to Windows, probably the best route is to write your own dir.c and dirent.h file in Visual Studio (all versions).
" -- https://social.msdn.microsoft.com/Forums/en-US/8a022e07-4a83-44fb-950b-f29f1ff3ac28/crtdlldirh-not-found?forum=vcgeneral[^]

You could try replacing <dir.h> with <windows.h>.

But you night need to find a compiler that does have one. Because I don't think you'll be able to work around it yourself.

I also see that it expects bios.h -- and I don't have one of those either. Here's what I found:

"
As far as I know, bios.h is MS-DOS-based, so it won't be compatible with any OS post Windows ME, let alone the VC++ 2008 compiler.
" -- https://social.msdn.microsoft.com/Forums/en-US/8ffc9ea8-ccaf-4317-9248-aea4cf91f331/biosh-in-visual-c-2008-express-edition?forum=Vsexpressvc[^]



I suspect that the code you've been assigned may be very old and the development environment may no longer be available.

In your other post, you mentioned DEV-C++ -- I hadn't heard of it, but maybe that's what you want? Did your teacher specify you should use DEV-C++ ? If so, then why aren't you?

This appears to be the site for DEV-C++ : http://bloodshed.net/[^]

Oh, wait, I see it says "It uses Mingw port of GCC (GNU Compiler Collection) as it's compiler" -- which is what Quincy does as well. And I don't see a bios.h with my install of MinGW.
 
Share this answer
 
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900