Author Topic: Problem with code completion, file streams and STL  (Read 3572 times)

kalif

  • Guest
Problem with code completion, file streams and STL
« on: June 23, 2007, 11:49:03 am »
Hello to anyone,
I'm new to C++ and I'm still in the "seek for a good IDE" phase.
After installing C::B-svn revision 4154 on my Archlinux box
I started a new project and type some code.
I notice that the code completion doesn't work at all with fstream object

[...]
ifstream  fin("file.txt");
fin.
[...]

doesn't open the list of possible functions member

For STL object code completion works, but the function members list
is not complete, a lot of functions are missing.

Surely my newbieness plays an important role  :roll: in this problem,
how can I fix it?

Thank you in advance for any hint/tip/advice/help
cheers,
Fabio

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Problem with code completion, file streams and STL
« Reply #1 on: June 23, 2007, 08:23:20 pm »
First, make sure that the global includes are enabled in the Editor Options / Code completion and C++ parser.

If that doesn't work, then I'm afraid this feature isn't supported yet. Don't worry, I have a hard time searching for STL functions. I browse the web constantly for them.

Last-Attacker

  • Guest
Re: Problem with code completion, file streams and STL
« Reply #2 on: June 24, 2007, 08:00:35 am »
Hi there
I also would like to see a more complete version of the code completion as I am also pretty dependent on it.
However, Code::Blocks does have a pretty cool custom help support. You can get a C++ Reference CHM here: http://onnerby.se/~daniel/chm/
Then place it somewhere and open CB. Click on the Settings menu->Environment
Scroll down to Help Files in the image list on the left side.
Click on Add and add the c++ help file.
You can mark it as a default, so that whenever you need help on C++, press F1.
If you want to know help on a function, click on the function name in the editor and press F1.
It should open the help file already marked on that function name.
The C++ reference file is also nicely done and pretty much thorough.
You can do the same with the SDL and wxWidgets help files.

Hope this will help you while we all wait for the extended code completion.  :wink:

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Problem with code completion, file streams and STL
« Reply #3 on: June 24, 2007, 08:24:55 am »
Hey, I wonder if we could bundle that help file with CB. What's the copyright license of that doc?

Offline Morphius Faydal

  • Multiple posting newcomer
  • *
  • Posts: 75
Re: Problem with code completion, file streams and STL
« Reply #4 on: June 24, 2007, 08:47:22 am »
Hey, I wonder if we could bundle that help file with CB. What's the copyright license of that doc?

The .CHM is just a recompile of the downloadble .tgz from cppreference.com.. Their license looks like it's "As long as you provide a link back to us, and say we made the original, it's cool"

Although you might want to check...

Offline lubos

  • Almost regular
  • **
  • Posts: 131
Re: Problem with code completion, file streams and STL
« Reply #5 on: June 24, 2007, 11:03:47 am »
Hey, I wonder if we could bundle that help file with CB. What's the copyright license of that doc?
this is a good idea. i remember a years ago, when i was using dev-cpp, there was small help-book bundled with it. it helped me a lot, i didnt know anything about c++  :D

Last-Attacker

  • Guest
Re: Problem with code completion, file streams and STL
« Reply #6 on: June 25, 2007, 07:23:30 am »
I guess someone has to e-mail the owner :wink:
I had a look at the site, archive, etc. and didn't find any licensing. Even the FAQs are not specifying it.


Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Problem with code completion, file streams and STL
« Reply #7 on: June 25, 2007, 07:29:53 am »
I'll do it.
Edit: Done.
« Last Edit: June 25, 2007, 07:33:43 am by rickg22 »