Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ldestroyer on July 11, 2011, 03:40:24 PM

Title: Code Completion in string class
Post by: ldestroyer on July 11, 2011, 03:40:24 PM
I am using Code::Blocks build 7256 debugger branch version. Code completion works well, but in some cases, such as string class, cin, cout, it does not work. For example, if I write "string s = "abcd"; s.", after dot I see nothing. The same situation in cin and cout. I want to be able to see the methods of this classes. In other cases the CC works well (even with STL vectors, maps, etc.). What do i need to do to make CC work?
In addition, if I write "string::", I see all methods.
Title: Re: Code Completion in string class
Post by: ollydbg on July 11, 2011, 04:14:56 PM
Likes a bug, and can you post the exact test code and steps, so that other people can test it or even fix the bug.
Title: Re: Code Completion in string class
Post by: ldestroyer on July 11, 2011, 06:48:24 PM
I was trying to create a simple console application.

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s1;
    cout << "Enter your name\n";
    cin >> s1;
    if (s1.empty())       //at this point there is no Code Completion after s1.
    {
          /*some code*/
    }
    cin.get();             //at this point there is no CC (only _M_extract() method shown there)
    return 0;
}

But if in the code try to type:

string::

CC works well and all methods for string are shown.
Also if try to type:

cout.

There is only _M_insert() method shown.
I use Debian Linux. And I have tried to insert in search directories line '/usr/include/c++/4.4.5', but nothing changed.
Title: Re: Code Completion in string class
Post by: Jenna on July 11, 2011, 07:36:14 PM
It works if the actual debugger-branch ismerged with trunk (trunk to merge).

I can update the debugger-branch, after I have cleaned my local copy.
Title: Re: Code Completion in string class
Post by: ldestroyer on July 11, 2011, 08:38:11 PM
What does it mean? Waiting for update, where this bugs are fixed, in your repo?
Title: Re: Code Completion in string class
Post by: Jenna on July 11, 2011, 08:59:08 PM
Quote from: ldestroyer on July 11, 2011, 08:38:11 PM
What does it mean? Waiting for update, where this bugs are fixed, in your repo?
Yes.
I just merged trunk to the branch.
At the moment I compile trunk and debugger-branch aqnd will add it to my repo soon.
Title: Re: Code Completion in string class
Post by: ldestroyer on July 11, 2011, 09:28:11 PM
Ok. Thanks for help.
Title: Re: Code Completion in string class
Post by: Jenna on July 11, 2011, 11:07:42 PM
It's in my repo now (revision 7282 for trunk and 7283 for debugger-branch).
Title: Re: Code Completion in string class
Post by: Sergio14 on November 03, 2021, 07:36:16 PM
Hello,

I just start with coding and after few initial lines I figure out that my code::blocks is not working as it should. The issue is completely same like is described in this topic 10 years ago: "Code completion works well, but in some cases, such as string class, cin, cout, it does not work. For example, if I write "string s = "abcd"; s.", after dot I see nothing. The same situation in cin and cout."

Is there meantime any solution for this?

Thank you