HELP please

guys please i need someone to solve this exercise.... need to make this exercise until tomorrow otherwise i will get cut in programming... i can not do anything...All the exercise was in greek but i translate in english..if there is something wrong, sorry for my english...PLEASEEEEEEEEE


"""Develop the function char ** indexedKeysAndOPerators (const char * fName) with the following specifications :
The fName parameter represents the path + name of a source file C + +.
The return value represents an array of null terminated strings. For each katholiko1
The string produced for each ledger block insertion code will call the representation of keys . block of source code fName there is an element in the table return . The element is formed from the keywords and the operators of the respective blocks as follows : Each keyword (keyword) and / or operator (operator) encountered in block numbered and inserted numbered sto string. Different keywords and / or operators have a different numbering . Also , the numbers are different for each block .
For example :
# include <iostream>
# include <fstream>
using namespace std;
void displayFile (const char * fName) {
ifstream in;
in.open (fName);
if (! in.is_open ()) {
cout << fName << "not opened" << endl;
return;
}
char buffer [1024];
while (! in.eof ()) {
in.getline (buffer, sizeof (buffer));
cout << buffer << '\ n';
}
in.close ();
}
int main () {
displayFile ("main.cpp");
return 0;
}
The code above has 2 universal block : body displayFile ( yellow area ) and the body of main ( green area). Therefore , the key representation for the yellow and green blocks are respectively as follows :
1 Catholic called a code block that is not contained within another block .
Subsidised work in the Technical Planning Spring 2014
2
• In the yellow region have keywords as follows : 1 char, 2 cout, 1 endl, 1
if, 1 while and operands : 1 [, 3 (), 5., 2!, 1 return and 5 (.
• Similarly , in the green region have keywords as follows : 1 return and
operators: 1. 1 ( .
Accordingly, indexedKeysAndOPerators will return an array of size 2 to be
contains the following strings.
char1, cout1, cout2, endl1, if1, return1, while 1, [1, () 1, () 2, () 3,! 1,! 2, (1, (2, (3, (4, (5 , .1 ,
.2 , .3, .4 , .5
return1, (1, .1
Add a main that takes as a parameter the name of a source code C + + and
will print on the screen the result of indexedKeysAndOPerators.
A list of keywords and operators given file keywords.txt. The series of
keywords and operators can be changed in keywords.txt if deemed that
facilitate the implementation of indexedKeysAndOPerators."""

NOTE => [About the subsidized work:
Given in the attached, two functions that will probably come in handy.
Also, the file with keywords and operators, may exist spaces. The spaces these can be moved with the aid of a text editor, or a suitable source.]


Directions delivery
date paradosis2
Method of delivery : By mail to
: 18/05/2014 , 12pm .
Last edited on

Please note we are not here to do your homework for you - at least have a go and come back to us if/when you run into problems or have questions.
i understand but i am a undergraduate
student and if i dont do this exercise i will not get the certificate...

I understand your concerns but what good is a certificate in the real world if you were not the one who earned it?

At least attempt it - I would have thought your teacher would have learned you the necessary skills to approach this assignment, after all that's his/her job in the first place.

i understand but i am a undergraduate
student and if i dont do this exercise i will not get the certificate...


"... but, I don't get the reward if I don't do the work."

Welcome to life.
yeah i know but this professor is the most evil professor in the world...many students who are good programmers they can pass his lesson..i dont know where is his problem but he didnt do his job right..Anyway thank you for the answer
many students who are good programmers they can pass his lesson

If many students are passing then he's clearly doing something right isn't he?

To be a good programmer (or at least to complete an assignment such as this) you need to put some time and effort into it, and actually have an interest in C++ programming resulting in you wanting to learn.

Like I said in my original post, have a go at it and myself or some of the other peeps on here will gladly help point you in the right direction.

ok..
i mean that they cant pass..i wrote it wrong

Doesn't change the fact that if we write it for you its of no benefit.

These two links may help with your task:

File I/O: http://www.cplusplus.com/doc/tutorial/files/
Flow Control: http://www.cplusplus.com/doc/tutorial/control/




ok..thank you
Topic archived. No new replies allowed.