• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

C and C++

Joined
9/16/10
Messages
10
Points
11
Hi all,

Is anyone here familiar with both the syntax of C and C++? I'm only familiar with the latter but I desperately need help regarding the former. I think my problem is simple, it's just that I don't know anything about C.

Anyone keen to help me? I would appreciate it a lot. Thanks!
 
One book I like is "Expert C Programming" by Peter van der Linden

But, how can you be familar with C++ and know nothing about C? Do you mean you know reference, class, vector, template, cout/cint, new/delete in C++, but you don't know pointer, struct, array, function pointer, printf/scanf, malloc/free, variable length argument list?
 
I was a C programmer before C++ so will try to answer any specific question.

Be aware that K&R C is not standard C, though it is worth reading K&R because of the insights it gives, and because some interview questions are based upon it, especially Bloomberg.
 
I was a C programmer before C++ so will try to answer any specific question.

Be aware that K&R C is not standard C, though it is worth reading K&R because of the insights it gives, and because some interview questions are based upon it, especially Bloomberg.

Thanks DominiConnor.

I posted the question http://www.cplusplus.com/forum/windows/31821/ but no one was willing to help. I'd really appreciate any assistance.
 
I saw the question. What don't you know about C? If you know the syntax of C++, you automatically know the syntax of C. I find it hard to believe that you don't understand THAT program if you know C++.

Anyway, if you want to hardcode the name of the input file, do that at the very beginning (there is a variable named file that you can set). You can comment the lines that read the name of the file.

For the output, do the same. Hardcode the name of the output file and comment the lines that read the output file name from the console (scanf(...) function).

None of this is pretty or elegant but it will solve your current problem.

BTW, that program doesn't ask for anything at the end. I can only think you are running this program from some IDE that has that feature. I know the MS tools have it (Visual C++ and Visual Studio).
 
Quite a few C++ programmers go through life without knowng how memory management really works. Doing it once in C means you really understand it. Then move to new and smart pointers.

In the same vein, write a COM application once and then move to ATL.

When things break down you can bank on this low-level savvy in an emergency.
 
Back
Top