Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Hey, guys, I have a good idea!
Loaden:
For example this code, 'p' is a pointer, and 'a' is a value.
If type "p." or "a.", they show the same results.
--- Code: ---#include <iostream>
class A
{
public:
A();
~A();
void testMsg() {}
private:
int iLoveYou;
};
int main()
{
A* p = new A;
A a;
a.testMsg();
return 0;
}
--- End code ---
Because CC can identified a pointer, or value, so we can do that:
If it is a pointer, then automatically replace from "." to "->", like this:
form:
--- Code: ---p.testMsg();
--- End code ---
to:
--- Code: ---p->testMsg();
--- End code ---
[attachment deleted by admin]
TerryP:
Useful, might I also suggest handling an accidental ',' as well?
*groans* I still remember spending trying to figure out a compiler error, over an x,y typo, after an 8~12 hour straight coding run.
ollydbg:
blueshake has suggested that feature before, but there are objections.
Loaden:
--- Quote from: ollydbg on January 26, 2010, 02:57:42 am ---blueshake has suggested that feature before, but there are objections.
--- End quote ---
But such tips is clearly a very ridiculous!
p.testMsg();
--- Code: ---int main()
{
A* p = new A;
p.testMsg();
return 0;
}
--- End code ---
Both of “Qt Creator” and “Visual Assist X” selected from the "." To "->" conversion.
I hope CC team to re-consider this feature.
Thanks!
nanyu:
but how about the "smart pointer"?
std::auto_ptr<MyStruct> ap (new MyStruct());
ap. ?? //now the cc show thoese tips:
release()
get()
ap-> //show nothing.
Navigation
[0] Message Index
[#] Next page
Go to full version