No. The preprocessor does not work like this.
Why do you need a preprocessor variable to define a directory?
- Viewing Profile: Posts: fastcall22
Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics
About Me
Something studying something at someplace.
Community Stats
- Group Members
- Active Posts 1,874
- Profile Views 5,300
- Member Title Student
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
-
Location
Nowhere Important
Awards
-
Awards
Bronze Level Benefactor
Donated to Charitable Cause
1873
Excellent
User Tools
Contacts
fastcall22 hasn't added any contacts yet.
Latest Visitors
Posts I've Made
In Topic: c++ include define DIR
15 May 2013 - 07:32 PM
In Topic: 3D draw colors bleed into 2D draw colors
29 April 2013 - 09:14 PM
A wild guess, but I see a glEnable/glDisable pair for every OpenGL state except GL_COLOR_MATERIAL. Perhaps your 2d triangles are inheriting your 3d object's green material color?
In Topic: reinterpret_cast problem
13 March 2013 - 01:47 PM
Because you aren't setting each double to 1.0 -- you are setting each individual byte for the first double to 0x01. The layout for your double will be 0x0101010101010101, which is around 7.784e-304, according to IEEE-754.Still,the exercise asks: Why was not each element set to 1? I have no ideea how to explain it
You probably want to use std::fill instead:
double arr[4] = {};std::fill( arr, arr+4, 1. );(Also, 1.0 looks like 0x3FF0000000000000 in memory.)
In Topic: Randomly Generating Lines...
06 March 2013 - 01:41 PM
It's actually drawing the same line 10 times. This is because you are resetting the RNG after every iteration. See the System.Random constructor. The default constructor sets the seed to the current system time in seconds. Because it takes less than a second to draw those lines, you are getting the same seed, and consequently the same sequence of random numbers.I'm trying to randomly draw lines...
It produces 1 line :/
You'll need to move r before the loop.
In Topic: Including a c file
04 March 2013 - 10:29 PM
Remove the file from the project, and include it -- you can include files that aren't necessarily included in the project.Is there a flag I can set on the file to not compile it? Or is there a better way to do it?
Alternatively, you can include the c file in your project, and create a header file exposing a handful of pertinent functions...
- Home
- » Viewing Profile: Posts: fastcall22

Find content