Click here to Skip to main content
16,012,468 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to compile and run the "PortTalk" example program available on
the net. I'm using MS Visual C++ Express 2010. I am familiar with higher level programming but a complete "dummy" with C. Need step by step approach
to getting the example program (console application) compiled and running.
Any info would be much appreciated.
73
Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 29-Jan-11 22:13pm    
How much are you familiar with C++?
Sandeep Mewara 30-Jan-11 0:20am    
Comment from OP:
Not very much I'm afraid but I'm working on it. Its been a long time since I did any low level and hardware programming, mostly from DOS. Lots of Pascal, Fortran and some assembly, back in the days when the hardware was easily reachable. My main problem seems to be not so much C++ coding but rather putting the code pieces together with the proper defines, includes,etc. It'll all sink in after I make enough mistakes. A nice code sample would be great if any are available.
I thank you for your responce and I did RTFM but much has not yet sunk into this old brain.
73
Thanks again

The answer is contained in you question, in a way.

I don't know what else to advice but sit down tight and learn C, only I would advice -- C and C++ at the same time, checking all the differences in each step (because learning "C and later C++" often imprints bad habits). Actually DOS programming and Pascal is a good background to start (but probably not Fortran). Your idea to go step-by-step with console application is also a good one.

However, I don't think anyone would volunteer to start writing whole step-by-step school for you. There is plenty of literature around; and you can proceed by yourself. CodeProject would rather help you when you face a tricky problem (if you describe what you observe correctly and supply sufficient information on the problem). Maybe, someone also recommend you good reading.

Good luck.
—SA
 
Share this answer
 
Comments
Espen Harlinn 30-Jan-11 4:16am    
5+ Good answer
There are thousands of tutorials and code samples around the internet if you look for them. You could start with some of the articles here on CodeProject. Also take a look at http://www.winprog.org/[^], http://www.relisoft.com/index.htm[^], http://www.catch22.net/[^] for more help.
 
Share this answer
 
Comments
Espen Harlinn 30-Jan-11 4:16am    
5+ Good answer
Sergey Alexandrovich Kryukov 30-Jan-11 11:55am    
Richard, thanks for supplementing my answer which I hoped for; I'm not familiar with elementary literature.
My 5.
--SA
Richard MacCutchan 30-Jan-11 14:46pm    
Thanks for the vote. Looking at some of your answers I think you are far beyond the need for 'elementary' literature. 8-)
Sergey Alexandrovich Kryukov 30-Jan-11 19:39pm    
Thanks for this assessment, Richard, this is kind of flattering.
You know what, not exactly. I would need to know some good literature to help others.
Also, it's much more difficult to write elementary literature. I used to help some masterful person just throwing a hint and making a gesture, "well, you know..." and that person would say, "it's enough, I'll do the rest -- thank you". In contrast, really good elementary manuals are hard to find. I usually don't have time for those, but when my colleague buys one, I would borrow and look through. Unfortunately, I often see some problems. The books may be very useful, but sometimes... not that they tell direct lie, sometimes the author is not... very honest about a thing she or he does not really understand; instead of admitting that the author may tell some bullsh*t. Or some other problems... improper assumption on the previous knowledge of the reader, etc.
So, I would really like to have references on literature I could rely on.

Thank you.
--SA
Richard MacCutchan 31-Jan-11 4:40am    
I think most books have some value, but it can sometimes be a challenge to discover the parts that are not well written or totally factual.
OK You've been generous to spend time on the replies. Perhaps you would be so kind as to comment on the specific problem I have.
(1) In VC++ I set up a new Win32 console project and allow the compiler to "Precompile header"
(2) I have downloaded source code for the example program I am trying to run and I include the C code.
(3) I include another downloaded source required by source above.
(4) I do a build with apparently no errors and an .exe file is generated with the project name.(Try.exe)
(5) When the .exe is executed command screen flashes briefly with no output.
It's as if only the precompiled header ran.



Below is the precompiled header file.
It's a stupid question perhaps but where in the following code is the connection to the other code segments. I have the feeling I have to edit the file? Sorry to be such a pain in the ass but I'm getting a bit desperate.
-------------------------------------------------------------------------
// try3.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
-----------------------------------------------------------------------------
73
Thanks again. I'll bother you no more.
 
Share this answer
 
Comments
Richard MacCutchan 30-Jan-11 3:59am    
This is not a precompiled header, it's a complete program that does nothing. If your knowledge of C/C++ is really so limited you would do better to buy a book and start from the basics.
Sergey Alexandrovich Kryukov 30-Jan-11 11:58am    
G C Sraty,
I recommend you take this text and post a separate Question.
This text should be removed: you're not supposed to be here as you posted is as an answer, but it is not.
--SA

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