15,949,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by RastamanVibrations (Top 8 by date)
RastamanVibrations
22-Jan-21 4:39am
View
this was what was wrong in the end ,after changing this i no longer get calls for terminations , thanks alot my friend for reading through my code and finding my mistake , i highly apreciate it
RastamanVibrations
22-Jan-21 4:37am
View
my friend,thanks again for your previous answer on my previous question , your code although briliantly simple and functional , i cannot use it in a way to provide to the user the steps taken to produce the string . So i had to resort to making another programm that in the end allowed me to change the non-terminal symbols into terminal ones,all this is made randomly using a seeded rand , although i cannot use your code as is , still i highly aprecciate your answer
RastamanVibrations
21-Jan-21 20:09pm
View
alright i will see what i can do
RastamanVibrations
21-Jan-21 20:03pm
View
so how do i prevent this ?
RastamanVibrations
21-Jan-21 19:53pm
View
so the problem i am facing here is that ,by calling the same function over i cause a stack overflow ?
RastamanVibrations
21-Jan-21 19:48pm
View
its not a certain line thoe , i get thrown a termination
lets say the next string to be checked again is :
string is (v-Y)
temp = 5
turning E to (Y)--> it means that the search() function(the same you posted in code) detected a letter E while there obviously isnt one
token1 is (v-Y)
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 6) > this->size() (which is 5)
RastamanVibrations
21-Jan-21 19:44pm
View
ok, i am sry for the messy code , but as it seems even after changing the sizeof into s.size() i still get the error,how is my search() function detecting an E when the string is (v-Y) or (v+Y) etc.It just doesnt make sense.
RastamanVibrations
21-Jan-21 16:12pm
View
hello , and thank you very much for your answer my friend you really helped me out and it works perfectly
Show More