Author Topic: problems with fstream  (Read 7977 times)

Offline rilesdg3

  • Multiple posting newcomer
  • *
  • Posts: 10
problems with fstream
« on: January 19, 2012, 08:54:13 pm »
hell, I am new to code blocks and programing in a linux enviroment

my issue is that my code worked find in VS 2010 but it does not work in Code Blocks. The problem that I have is

fstream f;
f.open("adsf"); ///at this point intellisense does not offer f.open so if I type f. nothing comes up and I have
#include<fstream>
#include <iostream>
#include <sstream>

using namespace std;

 also I can not use std::fstream because fstream is not an option when I type std::

thank you for your help

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: problems with fstream
« Reply #1 on: January 19, 2012, 09:19:05 pm »
If you're using 10.05 or older you'll have to update to a nightly build and hope that it will work.
(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!]

Offline rilesdg3

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: problems with fstream
« Reply #2 on: January 20, 2012, 06:42:08 pm »
my ubuntu software center says I have downloaded and installed version 10.05-2, however when I start CB it says "Release 10.05 rev 0 (unknown date) gcc 4.6.1 linux/unicode - 32 bit

I think some how the problem lies within the stl and how code blocks looks/implements it because ifstream does not belong std:: I have downloaded kdevelop and the problem does not exist there,

Is it possible that I need to add something to the search directives? or did I some how miss something in the install process

thank you


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: problems with fstream
« Reply #3 on: January 20, 2012, 07:09:05 pm »
Is it possible that I need to add something to the search directives? or did I some how miss something in the install process
No, update to a nightly build. See here for details: http://apt.jenslody.de/
(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!]

Offline rilesdg3

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: problems with fstream
« Reply #4 on: January 20, 2012, 09:53:26 pm »
ok, thank you, I will try and figure it out, for some reason I am not able to figure out were/how to download and install, the link at jens sends me back to this forum for nightlies and from there I can not seem to find the right link, I found this link http://apt.jenslody.de/pool/dbg/c/codeblocks/ but once I get here do I need to download and install everything or is there just one that I need

I am really lost but I will try and get it figured out

thank you

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: problems with fstream
« Reply #5 on: January 20, 2012, 10:26:54 pm »
ok, thank you, I will try and figure it out, for some reason I am not able to figure out were/how to download and install, the link at jens sends me back to this forum for nightlies
That's not correct or your system/browser is totally broken.

As far as I know, there is no link to the nightlies subforum on my server, but a detailed instruction how to add my repo to apt's sources, so you can install a recent version on your system.
Don't forget to read the note for ubuntu users!

If you want to install a nightly of the debugger-branch, follow the (additional) instructions .

Offline rilesdg3

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: problems with fstream
« Reply #6 on: January 20, 2012, 11:26:50 pm »
your right I must have been confused with another link the link on your page take me to the cb download site,

I have followed all the steps at http://apt.jenslody.de/    how can I check and make sure that everything has been updated

thank you

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: problems with fstream
« Reply #7 on: January 20, 2012, 11:36:04 pm »
Hm, start codeblocks or learn your package manager?
(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!]

Offline rilesdg3

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: problems with fstream
« Reply #8 on: January 21, 2012, 12:05:47 am »
thank you and a thank you to Jens it only took me a day but I got it
when I start it up now it says svn build rev 7671 (2012-01-06 09:23:21)
gcc 4.3.2 Linux/unicode - 32 bit

I am working on learning the pakage manager