News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Code Completion Call Tip not working

Started by SimpleX, November 22, 2018, 05:58:58 PM

Previous topic - Next topic

SimpleX

Call tip is not working for vectorOne nor it is being autocompleted by the codeblocks. No problem with vectorTwo or vectorThree.

I am using codeblocks 17.12  x86 on windows. C++11 is used.
Code (cpp) Select
#include <vector>
using namespace std;

int main()
{
    vector<int> vectorOne {233,3};
    vector<int> vectorTwo;
    vector<int> vectorThree = {1,2};
    return 0;
}


oBFusCATed

What happens if you don't use the wrong c-tor? :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

SimpleX

Quote from: oBFusCATed on November 22, 2018, 08:19:11 PM
What happens if you don't use the wrong c-tor? :)
There is nothing wrong with the constructor.
I have edited the question. Here are reference links (to show that the constructor is valid) :
https://en.cppreference.com/w/cpp/container/vector/vector
https://stackoverflow.com/questions/8906545/how-to-initialize-a-vector-in-c

oBFusCATed

Does it work if you write it with () instead of {}?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

SimpleX

#4
Quote from: oBFusCATed on November 23, 2018, 08:54:22 AM
Does it work if you write it with () instead of {}?

Code (cpp) Select
vector<int> vectorS ({1,2,3});
//vector<int> vectorS (1,2,3);  is not a valid way.

Yes, it works that way.

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.