I'm approaching you guys for help because I really want to get this assignment right.
First: My main looks like this:
It's rough but it will give you an idea of what I'm doing...Code:#include <iostream> #include <string> #include <cstring> using namespace std; int main() { ifstream inFile; string fileName; string message; cout << "Please enter the file name you want to decrypt or encrypt: " << endl;//the encryption part was a maybe extracredit so ignore. cin << fileName; inFile.open(fileName.C_str(); system("pause"); }
I want to create an array (c string I think?) but I've stopped at [ because I want to know for sure I was thinking of beginning a function something like...
This is where I would like to send it to a reader function outside. The reader function would be the array I just mentioned to store the chars.Code:char inChar(char one&, one); { while(inFile) { inFile >> one; if(one > '\0') {
My questions: how many spots I should give it and why. (Explain how the compiler "sees" characters so that I can best understand what to tell it.)
How do I "properly" call my array from the first function to send the data. My instructor covered this in class but I didn't manage to get all the notes (she types very fast)
last since I can't nest functions in functions, can I nest any number of different operations of diferent data types within my function or is there a limit to that. I know I can't break an if or then but are there some other conflicts I should be wary of when attempting such integration?
Thank you in advance for any help.



LinkBack URL
About LinkBacks



