Search:

Type: Posts; User: Viewer

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    2,495

    It is not C++ way. I prefer stringstream...

    It is not C++ way. I prefer stringstream and operator>>.
  2. Replies
    4
    Views
    1,184

    cin.clear()

    cin.clear()
  3. Replies
    3
    Views
    1,130

    Use this:...

    Use this:
    http://en.wikipedia.org/wiki/GRASP_(Object_Oriented_Design)

    One suggestion, for example:


    class C {
    };

    class B {
  4. Replies
    9
    Views
    12,543

    Yes. If a get 100 false warnings then I can't see...

    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...
  5. Replies
    9
    Views
    12,543

    I use -W and -Wall compiler flags. If I switch...

    I use -W and -Wall compiler flags. If I switch off it then I do not get such a warning too.
  6. Replies
    9
    Views
    12,543

    Using Vectors. MinGW warning

    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()
    {
  7. Replies
    40
    Views
    13,280

    I see my error. int main() { string...

    I see my error.

    int main()
    {
    string shortest, str, longest;
    cin >> shortest;
    while(cin >> str)
    {
    if(str.length() < shortest.length()) shortest = str;
    ...
  8. Replies
    40
    Views
    13,280

    Ok. Without vector. int main() { string...

    Ok. Without vector.

    int main()
    {
    string shortest, str, longest;
    cin >> shortest;
    while(cin >> str)
    {
    if(str < shortest) shortest = str;
    if(str > longest)...
  9. Replies
    40
    Views
    13,280

    Ctrl + Z in new line? Ok. Let me show this...

    Ctrl + Z in new line?

    Ok. Let me show this code.


    #include <iostream>
    #include <iterator>
    #include <algorithm>
    #include <string>
    #include <vector>
  10. Replies
    6
    Views
    4,418

    My version class Region { public: ...

    My version

    class Region
    {
    public:
    vector<Agent *> RegionalAgents;
    bool ContainsAgent ( Agent *myAgent );
    bool find() {} // Conflict !
    };
Results 1 to 10 of 11