Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RavenEris

    Beginner's Question on RETURN statement

    It's not wrong. That would work, in fact. If you catch yourself writing expressions like this, though: HMS now(7, 14, 0); HMS twelve_hrs(12, 0, 0); now = now.Add(twelve_hrs); That's an awful lot of extra typing. What if you did this? // in the class defintion file (.cpp file) void...
  2. RavenEris

    Area of Application of C++

    I chose C++ because Visual Basic just simply didn't exist when I started programming. Pascal, yes... built-in Apple IIe BASIC, yes... even QBASIC... but C/C++ brings a greater level of control and power, a deeper understanding of the underpinnings of hardware, operating systems, programs, and...
  3. RavenEris

    Convert double to string

    You should check out sprintf(), too... Here's the prototype: int sprintf( char *buffer, const char *format [, argument] ... ); Where *buffer is usually just an array of char (like char temp[255]), *format is a string that looks like this "%e"...
  4. RavenEris

    Area of Application of C++

    Here are some example apps written in C/C++: Windows 95/98/Me/NT/2000/XP All the Office apps Linux Warcraft II, III Starcraft Doom Quake It's a full-featured, very efficient (when done right) programming language... although VB might be better for quickly creating Windows applications, VB can't...
  5. RavenEris

    Operator overloaded

    Also, you need to declare the operators "virtual" if they are not friend functions. That way, the correct one will be called in DerivedClass when you reference it from a BaseClass pointer. For more info on this, check out Effective C++ by Scott Meyers. It goes into this in great detail.
  6. RavenEris

    Console animations

    Programming when you're ten is so cool. If I'd only heard of "C" back then, I wouldn't have started with Apple IIe BASIC. ( = If you're doing C/C++, the only way to manipulate the console I know of is to use "ncurses"... go to http://www.gnu.org and find it. It might be WAY...
  7. RavenEris

    What is the equivalent of endl with TFileStream ???

    I don't have a lot of familiarity with Borland, but try outputting the character '\n'. That's the newline character, it should work. Don't they have a TextFileWriter, or something?
  8. RavenEris

    need 4 computers to interact, don't know about resources for that

    By way of sockets... depending on what you're working with, you can go client/server or peer-to-peer. In client/server, make one of those computers the server, and the other three computers connect to that. Everybody gets their information from the server, and don't make any decisions without...
  9. RavenEris

    #ifndef

    VC++ treats stdafx.h in a weird way, depending on your project settings. Make sure your project is highlighted then hit Alt+F7 to bring up your project settings. In the C/C++ tab, use the combo box to go to "Precompiled Headers". Basically, if you are using precompiled headers and...
  10. RavenEris

    Beginner's Question on RETURN statement

    Yeah, returning pointers is the best way to go. Of course, if you are making a new object to hold the added values, then Add() doesn't have to return anything. "void" will do nicely. E.g.: HMS one; HMS two; HMS three; three.Add(one, two); If you don't want this, maybe you want...
  11. RavenEris

    static classes exported from dll

    It is possible... depending how you are exporting your data (the weird, hard "list all functions" way or the sleek _declspec way)... In your .cpp file, when you declare your static members (they're only defined in the .h file), put this in front of 'em: _declspec(dllexport) I usually...
  12. RavenEris

    Dll allocations and crashes

    Are you using the STL? Microsoft DLLs don't like the STL, and any exported classes/members using it go bye-bye in a bad way during destruction. Static libraries are okay, but the whole dynamic-loading-linking thing goes nuts. It has to do with the way processes share memory, the way templates...
  13. RavenEris

    What is the best

    Hey there, You should get some good books on the subject, if you can... Try out these: High Performance Windows Graphics Programming by Stan Trujillo Isometric Game Programming with DirectX7.0 by Ernest Pazera Windows Game Programming for Dummies by Andre LaMothe Multiplayer Game Programming...

Part and Inventory Search

Back
Top