![]() |
|
#1
|
|||
|
|||
Pointers-general confusion of pointer type.Iv been working on a spellchecker for quite a while and im stucking try to get the program to simply take in one word at a time. Im sure theres a problem with the pointers being of the wrong type or iv written it badly at some point, im now left with the error "ERROR: An expression of type '<ptr>char' cannot not be converted to the function return of type 'int'" its pretty obvious wot the problem is but i just cant seem to solve it. Any help would b welcome.
CPP / C++ / C Code:
|
|
#2
|
||||
|
||||
|
Hi Warny. It looks like you are trying to get the code working that I gave you. I am on my way out the door, so I didn't look at it too close, but I noticed the biggest problem is that you haven't split out the split_word function. Basically this:
CPP / C++ / C Code:
should be included in the split_word function that you make. Right now you have declared it, but it doesn't exist. I will look at this more later, but I just wanted to clarify that point. ciao, d |
|
#3
|
||||
|
||||
|
Quote:
Also, comment your code so we know what is happening. What is "reference.txt"? The dictionary? The text to spell check? split_line() seems to be undefined. And what is the first while loop supposed to do? Just to check the split_line() function? |
|
#4
|
||||
|
||||
|
Hi Warny.
I have looked over the code and modified it to work. This is a pretty involved procedure and there may be easier and more straight forward ways to do this, but I like using the plain old char class and writing my own low level functions. Again I urge you to study this and ask questions where you don't understand it. If you just can't understand, post back and see if you can find an alternative solution. CPP / C++ / C Code:
|
Recent GIDBlog
Developing GUIs with wxPython (Part 3) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The