No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
8 Posted Topics
How can two classes uses each other without violating declaration before use? Can you give me an example? | |
I am studying and reviewing topics but haven't found definition that I somewhat favor, any answers for the below questions will be very helpful. * What exactly is meant by the phrase "interface for a class"? * Anyone knows any UML class diagram tutorial that they found helpful? * In … | |
Class extStrSet inherits from class strSet. The following function down-casts from the former to the latter. inline extStrSet& ss2extss (const strSet& ss) { return *(extStrSet*)&ss ; } Can someone explain how the down-casting is accomplished by explaining each part of the expression in the return statement? Also why is downcasting … | |
I was just wondering is this reading a file one byte per time? int main () { FILE * pFile; int c; int n = 0; pFile=fopen ("myfile.txt","r"); if (pFile==NULL) perror ("Error opening file"); else { do { c = getc (pFile); printf("%c-",c); } while (c != EOF); fclose (pFile); … | |
I am studying and reviewing topics but haven't found definition that I somewhat favor, any answers for the below questions will be very helpful. * What exactly is meant by the phrase "interface for a class"? * Anyone knows any UML class diagram tutorial that they found helpful? * In … | |
Give a main function written in C++. Your main function is to see if it has been passed exactly one command line argument (you are to check that there is exactly one), and it has the value –verbose The function will set the local integer variable foundVerbose to 1 if … | |
I am trying to create two functions both named maximum (which overload each other) that compute the maximum of two arguments. The first should find maximum of two arguments of type double. The second should accept two arguments of type string (not C-string types) and should return the argument that … | |
Question: So basically using the class below I want to create polynomials as can be seen in the example: Command: s Set coefficient. Give A n c: x 3 33.33 Command: o Output poly. Give A: x Polynomial x: 0x^0 + 0x^1 + 0x^2 + 33.33x^3 Command: s Set coefficient. … |
The End.