Jump to content
  • Advertisement

readme

Member
  • Content Count

    28
  • Joined

  • Last visited

Community Reputation

122 Neutral

About readme

  • Rank
    Member
  1. Basically I want to create a file name string depending on which instance of a class object tries to access it. Like each object of a class writes to a file named "data_xx.txt" where "xx" is replaced by the objects id-number. #define FILENAME(id) "data_" #id ".txt" fopen(FILENAME(obj.id), "rb");
  2. I had a rather long break from programming and I think I'm a little confused here. I don't remember if you can even do this but I want to create a macro which takes an argument (a numeric value) and appends it to a string. I thought something like this would work: #MACRO(i) "number_" #i for (int i = 0; i < 5; ++i) cout << MACRO(i) << endl; For a desired output of: number_0 number_1 number_2 number_3 number_4 Apparently it doesn't since the preprocessor will convert all "MACRO(i)" calls to "number_i". I tried several layers of macros but I can't get it to work. Is there even such an easy way to create variable strings?
  3. I installed VS 2005 without SP2 as described, worked fine. Only problem is that MS.NET and several VS 2005 files installed itself on C: without giving me another option, which is bad, since this is my OS only partition and this stuff isn't supposed to get there. Other than that is seems to work fine although I have to setup VS to all the files and stuff yet.
  4. I'll try it tomorrow and report back.
  5. Well, it's just that until recently I just didn't need an upgrade. My programming projects aren't that huge or advanced and I didn't see a reason to switch to something else. Maybe I'll like it a lot and that will change. But I will never surrender to SP2! My next Windows update will be Vista. Maybe.
  6. This reminds me, I'm still using VS 6 as primary tool. You can install both VS 6 and VS 2005 on the same partition, right? Also these three programs won't cause any trouble?
  7. Well, if this guy lists it as a work around for a non-SP2 system, it should work, right? ;) Still, what are these programs? Will they mess with anything else?
  8. I found this. Seems to be possible. Question: These three applications (You need to make sure to manually pre-install Windows Installer 3.1, the .NET Framework 2.0 and the MSXML 6.0 Parser), what are these and can I install them without any trouble on a SP1 system? I tried SP2 a while ago, didn't like it and my good old firewall has problems with it, too (not because of the MS firewall).
  9. Is it possible to install MS VS 2005 with only Service Pack 1 and without installing Service Pack 2? My system runs perfectly fine, I can't possibly install SP2, because it'll make trouble with certain programs I know of and I'm not in the mood to change a running system. If not, what's the reason for that?
  10. Well, thank you! I copied (and didn't check) the bubble sort loop out of a text book which has the same error. Really, I was thinking things were falling apart. As for the compiling I use MS Visual Studio 6.0 and I noticed that I could use for-loop variables out of their scope. In fact I get an error if I redefine c from the example. Is there a way to change this behavior in this version or is this standard for VS6.0? I used kbhit but forgot to take out the include in this example. I don't have cstdio.h and I don't know what you mean bei iostream (maybe ciostream?)
  11. Okay, new empty project, this is all the code. It's a bubble sort. #include <stdio.h> //standard input/output #include <iostream.h> //cout and co #include <conio.h> //kbhit() #define NE 10 void main() { //int x = 99; int ar[NE] = {0, 1, 10, 7, 8, 2, 3, 9, 11, 120}; int temp = 0; for (int c = 0; c < NE; ++c) cout << ar[c] << " "; for (int n = NE; n != 0; --n) for (int i = 0; i < n; ++i) if (ar > ar[i + 1]) { temp = ar; ar = ar[i + 1]; ar[i + 1] = temp; } cout << endl; for (c = 0; c < NE; ++c) cout << ar[c] << " "; } output is something like: 0 1 10 7 8 2 3 9 11 120 0 1 2 3 7 8 9 10 11 120 Fine. Now I uncomment "//int x = 99;" and I get: 0 1 10 7 8 2 3 9 11 120 0 1 2 3 7 8 9 10 11 99 What is happening?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!