Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Code Completion Call Tip not working

(1/2) > >>

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) ---#include <vector>
using namespace std;

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

oBFusCATed:
What happens if you don't use the wrong c-tor? :)

SimpleX:

--- Quote from: oBFusCATed on November 22, 2018, 08:19:11 pm ---What happens if you don't use the wrong c-tor? :)

--- End quote ---
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 {}?

SimpleX:

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

--- End quote ---


--- Code: (cpp) ---vector<int> vectorS ({1,2,3});
//vector<int> vectorS (1,2,3);  is not a valid way.
--- End code ---
Yes, it works that way.

Navigation

[0] Message Index

[#] Next page

Go to full version