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

  • Home
  • SEARCH
  • 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 8067593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:22:05+00:00 2026-06-05T12:22:05+00:00

i want to change my variable passed as argument to this function: bool verifyStudent(string

  • 0

i want to change my variable passed as argument to this function:

bool verifyStudent(string id, string name, int grade, int points, string type) {
if(!verifyId(id)){
    cerr << "Please enter 8 charactes id! format: YYMMDDCC\n";
    cin >> id;
    return false;
} else
if(!verifyName(name)){
    cerr << "Please enter name to 35 characters!\n";
    cin >> name;
    return false;
} else
if(!verifyGrade(grade)){
    cerr << "Please enter class between 8 and 12!\n";
    cin >> grade;
    return false;
} else
if(!verifyPoints(points)){
    cerr << "Please enter points between 0 and 300!\n";
    cin >> points;
    return false;
} else
if(!verifyType(type)){
    cerr << "Please enter 1 charater type! format: R,r - regional, D,d - district, N,n - national, I,i - international\n";
    cin >> type;
    return false;
} else {
    return true;
}

}

how i should get access to the given variable and change it when it isn’t verified by other function?

here is the way i call the function:

verifyStudent(iId, iName, iGrade, iPoints, iType);
  • 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-05T12:22:07+00:00Added an answer on June 5, 2026 at 12:22 pm

    In order to change the arguments, you would have to take references:

    bool verifyStudent(string& id, string& name, int& grade, int& points, string& type) 
    

    Although I’d say that function is not verifyStudent as much as verifyAndCorrectStudentIfNeeded.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use the argument I pass (this) in a JS function and
I want to change the variable value which is a member of a structure
I simply want to change a variable of an object from another class. I
I want to change the background color of my label with a variable how
i have many div's with the same background image and i want change this
I want to change the behaviour of the editable ComboBox. This is the behaviour
I have a Javascript function that is passed a string. The string that it
I am needing to find the argument passed to a function from the function.
I want to replace the text PATHTOEXPORT with the contents of a variable passed
When we want to change the value of an ordinary variable by in a

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.