![]() |
Problem with C++ Exercise
Hey guys.. Im stucked at my final exam with this exercise
To create a class UnordArray which can store a number of data (integers), the new embedded data are placed at the end of the structure. Create a class described by creating appropriate header and implementation files, which contain following data: • buffer, which is a sequence of integers in which stored data. • numElem, which represents an integer which stores the number the currently inserted in the data structure. To define a constructor, which landed the initial value of data member numElem. To define following functions of the class members: • int size (), which returns the number of data structure. • void insert (int val), which inserts the data value val at the end of the structure. • boolean delete (int val), searching the structure and if it does not contain data with a value val, returns false; in Otherwise removes data with value val, January terminator structure, and returns true. • int find (int val), searching through the structure if it contains data with a value val, returns -1, otherwise January Returns the value of the index which is the value val structure. • void print (), prints the data structure in order from beginning to end. To create a file koristi.cpp, which will be demonstrated use of the newly created class and all UnordArray Its features members. When creating the class It is forbidden to use ready-library classes and functions (other than iostream). I Tryed 1000 times to make it work but it's always says SOMETHING MISSING!!!!:freak::freak: Can u give me a hand here pls? ... Maybe some 1 can wrote some part of it.. or anything ? Pls guys , let's do it :S Thank you Kabom |
Re: Problem with C++ Exercise
You say that the you have tried 1000 times but can you tell me what you have coded so far ?
|
Re: Problem with C++ Exercise
SOMETHING MISSING doesn't look like any C error message I've ever seen.
Post the latest version of your code (use code tags) and the error messages from the compiler and let's see what the problem is. What version of what compiler are you using, and what operating system? |
Re: Problem with C++ Exercise
Code:
class UnordArray{see ya |
Re: Problem with C++ Exercise
Im done.. if u want to translate it at english u can try it ;) it's on my Language - MACEDONIAN
see ya[/quote] So does the program compile without any errors? If not what are the error messages?? |
Re: Problem with C++ Exercise
Quote:
|
Re: Problem with C++ Exercise
What errors did you get? I compiled it in Visual Studio 2008 and got no errors, just one warning about an unused variable temp.
Tried running it but I don't speak Macedonian so haven't got a clue what it says or is supposed to do. If the problem is not that you got compile errors but that the runtime behaviour differed from what you expected, what input did you give, and what output did you expect? Remember I can't see your screen or read your mind, so I need some other way of understanding what the problem is. By the way you don't need to ask if you need to translate code into English. The answer is almost always going to be yes, unless by sheer chance you just happen to get someone who speaks the same language as you, but that's only likely to happen on a Macedonian-specific forum, not an international forum like Go4Expert. On international forums you can always safely assume the dominant language is English. |
| All times are GMT +5.5. The time now is 04:00. |