userInput.hpp
#include <string>
class UserInput{
public:
    std::string rawInput;
    std::string parseUserInput;
}; 
userInput.cpp
#include <iostream>
#include "userInput.hpp"
#include "stringManipulation.hpp"
using namespace std;
string branchCommand;
string parseUserInput(){
    removeWhiteSpaces(rawInput);
    return branchCommand;
}
I have created a class in userInput.hpp with the member function parseUserInput and I mean to define that function in userInput.cpp. However, when I try to use rawInput inside the definition, I cannot without making it so that rawInput is declared as static.
Is it possible to use the rawInput string in the function's definition which is in another file without making the rawInput variable static?
 
     
     
     
    