I'm C# programmer that wants to learn C++.
On C# I use static classes to use methods without instance a class. Is there something similar to that in C++.
I have found this function and I'm not sure if I can have C functions in a C++ program or all the functions must be class' methods.
vector<string> split(string str, char delimiter) {
vector<string> internal;
stringstream ss(str); // Turn the string into a stream.
string tok;
while(getline(ss, tok, delimiter)) {
internal.push_back(tok);
}
return internal;
}
Can I have a c source file in a C++ program? Or maybe I need a static
class with static
methods?