Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7821579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:41:30+00:00 2026-06-02T07:41:30+00:00

ok so this is what i have but I am getting an error says

  • 0

ok so this is what i have but I am getting an error says ‘complexReverseString’: identifier not found??? where am I going wrong I looked it over to no avail

#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main()
{
    ifstream input;
    string forward;

    cout << "Please enter a string to see its reverse. (Will display reverse twice)" << endl;
    input.open("information.txt");
    cin >> forward;
    //reverseString(forward, findStringSize(forward)); a function I'm not actually calling
    input >> forward;
    complexReverseString();

    input.close();


}
int complexReverseString(string userInput)
{
    string source(userInput);
    string target( source.rbegin(), source.rend() );
    cout << "The reversed string is " << target << endl;

    return 0;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:41:32+00:00Added an answer on June 2, 2026 at 7:41 am

    You have to prototype complexReverseString() first before you call it.

    Either do it in the source file before the main entry-point like this:

    int complexReverseString(string userInput);
    int main() { ... }
    

    or do it in a separate header:

    #ifndef COMPLEX_STR_HPP
    #define COMPLEX_STR_HPP
    
    int complexReverseString(string userInput);
    
    #endif /* COMPLEX_STR_HPP */
    
    /* int main.cpp */
    #include "complex_str.hpp"
    
    int main() { ... }
    

    Secondly, you forgot to pass a parameter to the function:

     complexReverseString( /* parameter here */ );
    
     e.g
     complexReverseString(forward);
    

    Thirdly, since you did not change the string in complexReverseString() I suggest taking a const string, and perhaps a reference to the string:

    int complexReverseString(const string& userInput);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have defined a receiver for NEW_OUTGOING_CALL broadcast. But this is not getting invoked.
I have a function which creates an object of values, but im getting this
This should be simple, but I'm getting confused. I have a parent/child tables -
This seemed like it should be easy, but I have had trouble getting it
I have this but I got an error: -- test if a list contains
i have this query but this shows column does not exist SELECT p.content, (select
As the title says, keep getting this error when trying to compile. From Googling
I am getting an error that says: 'object' does not contain a definition for
I am getting an error in Xcode that says whatEverVariable is undeclared This is
I am getting this error in java in my junit test code. I looked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.