954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

[C++] Opening functions for editing?

Is there a way to open, say, cout, and edit it to your own personal use?

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 

why ? There are probably other more simpler and more portable ways to accomplish whatever it is you want to do.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

Well, I was just wondering. You saying portable has awoken another question: Is there a portable ide/compiler that I can put on a flashdrive (no installer, preferrably) that I can use at school and the likes?

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 

No -- you need one (or more) for each operating system. GNU compilers gcc and g++ are available on many operating systems, such it is just command-line driven.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

I don't think you understand what I'm asking. I mean like a compiler that I can put on my flashdrive so that I can program and execute cpp files at school.

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 

if your flash drive is big enough (1 gig or larger). But I wouldn't even consider running such a compiler from there -- it would probably be too slow. you might try Dev-C++, its 176 Meg on my hard drive.

Back in the old days (20 years ago) compilers fit on one 256K floppy disk. But those days are long gone.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 
I don't think you understand what I'm asking. I mean like a compiler that I can put on my flashdrive so that I can program and execute cpp files at school.



If you're talking about an IDE the answer would be no, as far as I know.. you might try Dev-C++, its 176 Meg on my hard drive.
That isn't portable when installed on a flashdisk. And you are right, even if it would run it would be extremly slow.

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

I have a 2gig flashdrive. Are there any that can actually be installed on it?

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 
I have a 2gig flashdrive. Are there any that can actually be installed on it?



Yes, bloodshed devC as Ancient Dragon allready mentioned. But:
- It's not portable between OS
- The install will make registerkeys which the other computer will not have, so if you put the flashdisk in another PC it will probably not run.
- It sounds kind of illegal to me.

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

try it and find out :) you can download Dev-C++ free from here , install it on the flash drive. I don't know if it will work or not, not sure if it installs any registry settings. If it does, then you probably can't use it.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

It does install registry settings. I use Dev-C++ as my main IDE (when I use an IDE that is). I guess I'll have to deal. And how does this "seem illegal"? I just want to program a bit at school where I can't install applications.

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 

the computer at school should already have a compiler installed.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

I dunno about that... do windoze systems come with compilers on them? If your school uses macs then you might be in business, but I don't think windoze comes with any c++ compilers.

And when I think about the "editing cout" thing, it makes me think about overloaded operators. ^_^

FireSBurnsmuP
Posting Whiz in Training
237 posts since Sep 2006
Reputation Points: 46
Solved Threads: 2
 

>Is there a way to open, say, cout, and edit it to your own personal use?
Yes, if you use a clone. Such as SGI's STL .

>Is there a portable ide/compiler that I can put on a flashdrive
IDEs of course are going to be way too complex. If you're really desperate, look into a command-line compiler; I know gcc requires the MinGW environment, however I believe that Visual C++'s command-line compiler runs natively with very little tweaking on just about any Windows box. And of course there's always Turbo.

John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

I dunno about that... do windoze systems come with compilers on them? If your school uses macs then you might be in business, but I don't think windoze comes with any c++ compilers.

And when I think about the "editing cout" thing, it makes me think about overloaded operators. ^_^

you mean to tell us that a college that offers c and c++ courses, requires lab assignments, do not have computers with compilers already installed for students to use :-/

And to answer you question -- no MS-Windows does not come with compiler(s) already installed.

Ancient Dragon
Retired & Loving It
Team Colleague
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

And my school doesn't have a compiler. I mean like having qbasic on a flashdrive -- no installer needed, but I can run applications and program there... Is there a premade compiler that is for that?

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 
John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

YES! Now how do I add to your rep?

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 
YES! Now how do I add to your rep?

Click "add to [name's] reputation" then click approve

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You