Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

framebuffer

macrumors newbie
Original poster
Nov 22, 2008
9
0
Hi!

I was testing Code sense to see how it compares with Visual Assist and I have run into a problem.

In XCode 3.1, when I type std:: and then hit F5 it says no completing.

But I created a little class to test and its working fine.

How to make code sense parse external libraries?

Even after creating a vector, like vector<int> coll;

code sense is unable to show coll. F5

It does not show any methods of a vector like push_back;


What am I missing?
Thanks.
 

framebuffer

macrumors newbie
Original poster
Nov 22, 2008
9
0
Include the <vector> import in your code.

Do you mean #include <vector>? Already did that.

BTW Its working now!!! I dont know how. Just exited xcode and went to sleep. Got up, read your post and tried again and it worked!

#include <iostream>
#include <vector>

using namespace std;

class Test
{
public:
void bar(int, int){ };

int foo;
};

int main ()
{
// insert code here...
std::cout << "Hello, World!\n"; //STD:: F5 NOT WORKING!

Test foo;
foo.foo = 5;
foo.bar(6, 6);

Test bar;
bar.foo = 9;
bar.bar(3, 7);

vector<int> collection;
collection.push_back(3);
collection.push_back(5); //F5 WORKING!!!!

return 0;
}

OR Do you mean including it in the include directories? How do u do that?

Also std:: is not working.

thanks,
fb.
 

framebuffer

macrumors newbie
Original poster
Nov 22, 2008
9
0
Hi Macrumor guy!

Thank you so much for the reply.

Consider this:

namespace mySpace
{
int foo;
}

int main ()
{

mySpace::



return 0;
}

Can code sense complete namespaces? Neither std:: nor mySpace:: is getting completed.

I tried restarting xcode too. I tried rebuilding the code sense database too.

Also, I dont understand c+F5. I tried pressing C and then the f5 but it keeps printing ccccccc

Thanks,
fb.

PS: simple pressing c without F5 is printing cout though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.