I have a console application using a case block to open some files. I just need the syntax for an 'open file' command. |
|
I know there are a lot of people trying to learn C++ on this forum. I'm a professional C++ programmer, and it's an enormously complex language so ask me anything. There are lots of things you need to know to write good C++ code: iterators, inheritance, OOP, procedural programming, static and dynamic functions, macros, scope, consts, virtual methods, encapsulation, pointers, null objects, threading, mutexs, cross platform, callbacks. |
|
I have a console application using a case block to open some files. I just need the syntax for an 'open file' command. |
|
Can you see me now?
Can I ask, is this only with C++ or other C languages too? |
|
Last edited by Dairyman; 05-15-2009 at 11:00 AM.
Ugh, files are a pain. There are good libraries out there (I use wxWidgets,) but pure C is hard. |
|
Crap, I meant C++. Sorry, but... um.... yeeeeeeeeeeeeaaaaaaaaaaah. Could I get that the Open File command on C++? Command for the Standard Library? |
|
Last edited by The Invisible Man; 05-17-2009 at 10:24 PM. Reason: Clarification. Sorry dude.
Can you see me now?
Yes, but it's in a different library in C++, I think it's in <iostream> |
|
I have <iostream> and <stdlib.h>. What's the command? |
|
Can you see me now?
They are the same as C. C++ is a [nearly] complete superset of C. |
|
What language did you learn before C & C++? |
|
Basic and assembly. |
|
So you're saying |
|
Last edited by The Invisible Man; 05-20-2009 at 05:54 AM. Reason: tabbing
Can you see me now?
Yes, that's how you open a file, write the words "Stuff to write" to it, and then close it again. |
|
You can do file i/o the fstream way too, which is usually cleaner. |
|
let's just say this. it's "has an ass rocket, kills self, and goes to hell" (AKA Infinity) hard. |
|
An idea I just had regarding ebooks and the library system led me here... |
|
|
|
Last edited by A Roxxor; 05-23-2009 at 01:46 AM.
Better reduce the "loan time" on those |
|
(\_ _/)
(='.'=)
(")_(")
Aye, I agree/know that, realistically speaking, it would never work. Just wishful thinking, really, and thought it posed an interesting hypothetical question for this thread. I guess the more practical way to do something of that nature would be via the internet, using Flash to prevent easy copy & pasting. Even that would be less than ideal, of course. |
|
Yes, C++ is the most powerful language that there is, you can use it for something like that. However, I wouldn't use a timestamp, seeing as people can change their system time. I remember Apple having a problem with people renting movies on iTunes and then setting back their clocks. |
|
Hey, I am trying to cover the basics of C++. |
|
|
|
I have a package called "atomic parsley". Instead of a make file, it has a shell script with commands to compile each unit without linking, then goes through a second time and links everything. Each source file seems to have all the includes it needs, as-is. But on the compile w/o linking stage, it's using g++ with command line options which I don't know the importance of, which fail with a syntax error on all the c compilers I've got, even the version of gcc I have. |
|
Ouch, creating makefiles for large projects suck |
|
Yes, I've been figuring that this will suck. But I really need some kind of code for dumping itunes m4a tags to a plain text file |
|
Bookmarks