I presume it should be possible to include the SDL headers in your code and add the SDL .lib file to the linker's path for Turbo C++, does that work? And if not, what problems did you encounter?
On the matter of Code::Blocks' invalid compiler, I suspect you have downloaded the version without the MinGW compiler included.
User Profile
Collapse
-
May I ask why you are using such an outdated compiler?
There are enough free IDE's that come with compilers that are explicitly supported by SDL. The most popular for windows that I know of are Visual Studio Express, Code::Blocks and Dev-C++.
Using a modern compiler also makes it easier to get support as well.Leave a comment:
-
It's been a while since I've done anything frequency related so could you explain what the value for delay should be?
Right now it is equal to warmup, since half of line 8 is commented out.
If you're using Python 2.x rather than 3.x the problem might be integer division related since warmup and sample_rate are both integer values (assuming you're using the full line 8 without anything commented out). Python 3.x integer division...Leave a comment:
-
First of all, in the condition for that while-loop, you're using the comma wrong:
So for your while-loop, only count != numberOfItems is used. You should use the logical and-operator (&&) instead of the comma-operator.
As for the for-loop, it's also a bit different from what you have. The structure for a for-loop is (also in the C++ Specification; section 6.5.3, page 99):
for(initialisation;condition;...Leave a comment:
-
Is it possible you're seeing buffered output? Try refreshing the page with ctrl+f5 or opening it in another browser if it shows a parse error when it shouldn't.Leave a comment:
-
As it looks now, it seems your code waits for the API request to finish before continuing on to the next number. By creating all requests first then executing them all at once this problem would be eliminated.
I believe the curl_multi_* functions can help you with this.Leave a comment:
-
As described in the documentation, the quality parameter only goes from 0 to 9 for png images.Leave a comment:
-
Have a PHP-script output the value so an XMLHttpRequest-object in Javascript can request it.
You can find the details on how to do this here: W3Schools AJAX TutorialLeave a comment:
-
You can't do that as far as I know.
The most straightforward approach to getting something similar would be using an array with string indices, for example:
[code=PHP]
values["test1"] = 100;
values["test2"] = 300;
setValue("test1 ",300);
[/code]
Where the setValue()-function would be this:
[code=PHP]
function setValue($targe t,$value) {
//perform value...Leave a comment:
-
Are you sure $cnt has the correct information? Why don't you calculate it yourself?Leave a comment:
-
If you count the brackets in HASH::retrieve( int) you'll notice you are missing a closing bracket there.
The compiler thinks you have defined HASH::Remove(in t) inside HASH::retrieve( int) because its body is never closed.Leave a comment:
-
This wouldn't work because the "<" operator on the commandline is made for input from files, not strings.
You could try writing input and output to a file and then use that file to run the program with.
Something like this:
[CODE=Python]f = open('temp', 'w')
f.write('input\ n')
f.write('output \n')
f.close()
os.system('prog ram < temp')[/CODE]...Leave a comment:
-
I believe you are looking for the "View Transform".
Here's an MSDN article on this topic.
The article is written for dx9 though, as the MSDN documentation on dx11 doesn't seen to be finished yet. I don't know how much the function calls differ, but the theory should apply to both.Leave a comment:
-
Looks like I was wrong twice, apologies for that.
You could have eq1 as a QueueArray-pointer and use the new operator on line 23 (don't forget to delete it afterwards in the destructor of your class).
I'll try to get someone to explain whether there is a way to do it without pointers to both you and me.Leave a comment:
-
Oh wait, my bad. By prepending that statement with QueueArray you're redefining eq1 locally in the constructor. Meaning that within the constructor, every reference to eq1 goes to the version that is local to the function, rather than the class-wide version.
Replacing line 46 with the one I gave earlier and removing line 23 should do the trick (hopefully I'm right this time).Leave a comment:
-
I believe the OP has an array mostly filled with zeroes and wants to convert it to a smaller array that contains the non-zero values and their coordinates.
Don't have a clue what the actual question is though, unless it is "how do I do this?".Leave a comment:
-
I believe line 23 is where the problem lies: by calling the constructor directly, the Queue-array object that is created is temporary, and only exists for the duration of that statement.
The correct way of creating the object would be like this:
Code:QueueArray eq1(MAX);
Leave a comment:
-
I wouldn't really call that "getting it to work" as you're just trying to assign "paris" to france, you're not comparing them to each other.
I think it might help if you read up a bit on null-terminated character arrays. [link]
Perhaps you should also check out the assignment and equality operators again. [link]Leave a comment:
-
Fixed it. Stuff like this is what you get when you mix some Java in your C++.
The change, for those interested:
Code://the code which creates the objects //water,hills and active are all an uninitialised [b]FieldMap*[/b] //gs.rows and gs.cols are integers this->water = [b]new[/b] FieldMap(gs.rows,gs.cols,255); this->hills = [b]new[/b] FieldMap(gs.rows,gs.cols,128); this->active = [b]new[/b] FieldMap(gs.rows,gs.cols,128);
Leave a comment:
-
"new" always returns the same pointer
I have written a class which allocates an array of unsigned chars using new, but when I create multiple instances of this class, they all point to the same block of memory. Any idea what I'm doing wrong here?
Code://the relevant code in the constructor //v is an unsigned char* //r and c are integers //init is an unsigned char this->v = new unsigned char[r*c]; memset(v,init,r*c);
Code://the code which
No activity results to display
Show More
Leave a comment: