Part2)Project Generator for Tony Gaddis Starting out with C++ From Control Structures Through Objects

The C++ class I’m in is running at a slow pace relative for my skill sets. The class focused on chapter 5,looping. It’s just that I’ve been doing vb6 programming for a long time and I saw very little new there for me. Although my arrogance here will probably catch up with because I’m probably going to miss something subtle in the midterm because of this.

I like to automate the setup of project folders for the sample code .  I’d like to get this project generator done before the class if over, so I can use it for my class but I need the class to get it done.
Setting up the folders and moving the cpp files is not too painful done manually. Automated folder creation and file copy is being pushed off till later The primary focus at the moment is writing out the project files into the manually created sub-folders.
I’m going for the minimalist approach here, just to get this done and will tune it up a little bit more as time goes on.
Here’s the pseudo code
Find the name of each directory to be inserted(Currently manually created)
read the sample template file a line at a time
If something needs to be tweaked then tweak it
redirect the data into a project file where it needs to go.
So… I’ve hacked up the code a bit and what I need is the C++ equivalent to a vb6 mid$ function.. Man is this a PIA.. I think I found some discussion on that. !!!! THIS IS THE ONE I USED


The next issue is that I need to find the c++ equivalent to vb6 instr function. It seems that mid$ and Instr are a couple of my weapons of choice in my vb code arsenal…. I found the c++ equivalent here. will be the rough equivalent.

On just a side note, if found this hand xref to string functions.

Lets see. I found some POSIX code that would read directories.  The initial code I found didn’t differentiate between folders and directories.
Hear’s link that discusses that.

Well, while we’re at it, the initial code I had would only show the file name and not the file type. I found that answer in a wiki link:

Anyway.. I got a basic shell of a program to run, to automatically generate project files, but it’s really too ugly to post at the moment.
I have midterms coming up, and I don’t want screw them up by working on the fancy stuff and missing something obvious so I need to put this on the backburner for the moment.  If someone actually read’s this before I get this project done, end a comment and I’ll post it.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *