Please Scroll Down to See Forums Below
napsgear
genezapharmateuticals
domestic-supply
puritysourcelabs
UGL OZ
UGFREAK
napsgeargenezapharmateuticals domestic-supplypuritysourcelabsUGL OZUGFREAK

Any C++ programmers??? Please I need some help!

Warik said:


If I said exactly what was on my mind whenever anyone asks me for programming help, no one would ask me again; however, everyone would think I'm a ruthless asshole (as if they don't already think so!)

-Warik

"Think" ?? come on, we all know you are a ruthless asshole.
nothing wrong with that :)
 
Warik, I guess I'll look for support elsewhere if I have any questions on Visual Basic. I have about zero knowledge of any language. I just picked up a new book by John Smiley. This book is the best I have read so far. It teaches the knuckleheads like me who know nothing about programming some of the basics. I have a Wrox press book that I may get into later called begining Visual Basic 6. It lost me in the first chapter, it was geared more for a C++ guy learning VB. You guys know of any other good books for VB, beginner speed?
 
hell, the msdn site is a great reference. (http://msdn.microsoft.com) that's why its there. I used to use it everyday until I became the all knowing god that I am today.

I know VB, VBScript, I know C++ (although haven't used it in ages), C, Perl, Java, JavaScript, SQL, XML/XSL, WML, ASP (well, technically that is pretty much vbscript), and PHP.

I'll gladly answer questions on any of them if they are specific - if they are vague then I'm likely to just want to give you "hints" so that you can actually read about it and learn something instead of knowing that for that part you can just ask someone how to do it. ask once and then learn to do it yourself forever. too many people just rely on asking the smart programmers and we waste our time answering questions all the time (not a waste if you actually learn and aren't gonna come back and ask the same question again the next day).
 
I am really not clear on what you are trying to do with respect to breaking up the string to pass to the execute function?? If you can elaborate then I can help you.

btw, the absolute best book that you should get on introductory C++ programming is:

How to Program C++ by: Deitel & Deitel

This is the ultimate beginners reference and it's affordable.
 
Sorry, I reread the question and now I understand what you have to do.

Sassy is basically correct. Every C/C++ program should have an entry point function called main:

In C:
void main (char* arg, char** args)
{
//arg = the number of parameters inputted from the console

//args = an array which contains all the arguments.
}


In C++
void main()
{
char * a;
cin >> a;
}

in C++ "cin" is an overloaded operator that handles all the pain in the ass work of fucking with the argument parameter in C command line programs.

I am not 100% sure about the syntax but I know I am really close. Most of my work as of late has been in Java so my C++ is a little weak at the present moment.

Let me know if you need any help.

The Doc
 
also The C++ Programming Language Special Edition
by Bjarne Stroustrup would be a good one since he was the one that got it started - just as the Kernighan/Ritchie was the one to read for C since they started it...
 
Ahhhhh.... the good ol' K&R. Right up there among my favorite refs, like Scott Adams' "The Dilbert Principle"..... Also have a copy of Stroustrap and the ever lovin MSDN.

Brings back fond memories of 5 am in the computer lab trying to finish my CS assignments, and then 3 days straight on the computer when I started working. The joy of it all.

Damn I'm glad I'm in marketing now.... (Well actually, anyone else have a good suggestion for another career ... kinda getting sick of corporate america in general....
 
the best thing about java is how slow it runs... on all machines.
amazing really.
easy to program in though - hard to deploy effectively.
 
Java is great for server development but horrible for client side and embedded systems. Its very slow in certain respects, but then extremely scaleable.

In my opinion you don't learn anything about computer science from programming in java because all your memory management is being handled for you.

The Doc
 
For a UNIX shell, why are you using C++?


argv & argc are going to contain your command line entries. This should be done in C.

Look in <unistd.h>
 
Top Bottom