![]() |
|
#1
|
|||
|
|||
Identifier not found - quick helpI am trying to get the code to work for the following homework assignment:
Write a function, removeAll, that takes three parameters: an array of integers, the length of the array, and an integer (say, removeItem). The function should find and delete all the occurrences of removeItem in the array. If the vlaue does not exist or the array is empty, output an appropriate message. (Note that after deleting the element, the array size is reduced.) Assume that the array is unsorted. I tried my best and have the following code. I am getting an identifier not found for seqSearch and a few other problems. Any help is appreciated. C++ is going to drive me crazy!!! CPP / C++ / C Code:
Last edited by LuciWiz : 05-Mar-2005 at 07:30.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#2
|
|||
|
|||
|
fix your seqSearch spellings. some places it's seqSearch, other places it's SeqSearch.
__________________
spasms!!! |
|
#3
|
|||
|
|||
Sequential SearchQuote:
Thats actually all I did =\ |
|
#4
|
|||
|
|||
|
Quote:
__________________
spasms!!! |
|
#5
|
|||
|
|||
|
Quote:
If you read my first post the question only wants you to write a function, so I did the best I could. I don't know what else I need to do. I don't see any spelling errors. I have 3 other classes I am studying for (finals) and my brain is boggled. Sorry if I sound stupid I am |
|
#6
|
|||
|
|||
|
ok sorry. but seqSearch spellings are different in two places
in one it's seqSearch and in other it's SeqSearch. Thats probably your problem. __________________
spasms!!! |
|
#7
|
|||
|
|||
|
Quote:
I think I have fixed the problem in the function. Now I need to create a main function to test it. Can anyone help me start it. Sorry I am a beginner! :-? CPP / C++ / C Code:
Last edited by JdS : 05-Mar-2005 at 08:06.
Reason: please insert your example C codes between [c] and [/c] bbcode tags
|
|
#8
|
|||
|
|||
NevermindNevermind I figured it out. Thanks to nobody but me!
|
|
#9
|
|||
|
|||
|
you might want to take out the entire RemoveAll function and place it above main and then call it from main. also your main needs to return 0 before terminating. make sure SeqSearch function definition is also located not only above the main but also above RemoveAll function definition. example:
CPP / C++ / C Code:
__________________
spasms!!! |
|
#10
|
|||
|
|||
|
[quote=machinated]you might want to take out the entire RemoveAll function and place it above main and then call it from main. also your main needs to return 0 before terminating. make sure SeqSearch function definition is also located not only above the main but also above RemoveAll function definition.
Thank you so much for your input! I appreciate it very much. However, I figured it out. Thanks again =) |
Recent GIDBlog
Meeting the local Iraqis by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fraction program | SpudNuts | C++ Forum | 6 | 25-Sep-2006 03:50 |
| Can enum have same name as class? | crystalattice | C++ Forum | 3 | 08-Dec-2004 16:43 |
| Help! undeclared identifier error | wfillis | .NET Forum | 8 | 25-Aug-2004 06:03 |
| Dummie needs help - URL not found | Lrosewitz | Apache Web Server Forum | 1 | 28-May-2004 14:32 |
| Kernel panic: No init found | JdS | Computer Software Forum - Linux | 9 | 04-Dec-2003 01:26 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The