It is not C++ way. I prefer stringstream and operator>>.
Type: Posts; User: Viewer
It is not C++ way. I prefer stringstream and operator>>.
cin.clear()
Use this:
http://en.wikipedia.org/wiki/GRASP_(Object_Oriented_Design)
One suggestion, for example:
class C {
};
class B {
Yes. If a get 100 false warnings then I can't see genuine problems. Can I hide this specific code for compiler warnings? May be some #pragma will help me?
Only alpha available. I tested this...
I use -W and -Wall compiler flags. If I switch off it then I do not get such a warning too.
I use Code::Blocks 8.2, MinGW(gcc-g++-3.4.5-20060117-1-vista).
#include <vector>
#include <string>
using namespace std;
vector<vector<string> > Foo()
{
I see my error.
int main()
{
string shortest, str, longest;
cin >> shortest;
while(cin >> str)
{
if(str.length() < shortest.length()) shortest = str;
...
Ok. Without vector.
int main()
{
string shortest, str, longest;
cin >> shortest;
while(cin >> str)
{
if(str < shortest) shortest = str;
if(str > longest)...
Ctrl + Z in new line?
Ok. Let me show this code.
#include <iostream>
#include <iterator>
#include <algorithm>
#include <string>
#include <vector>
My version
class Region
{
public:
vector<Agent *> RegionalAgents;
bool ContainsAgent ( Agent *myAgent );
bool find() {} // Conflict !
};