Posts
 
Reputation
Joined
Last Seen
Ranked #224
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
94% Quality Score
Upvotes Received
33
Posts with Upvotes
28
Upvoting Members
21
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
1
17 Commented Posts
0 Endorsements
Ranked #505
~91.4K People Reached
Interests
Programming
Favorite Tags
c++ x 156
c x 99
perl x 5
java x 4
Member Avatar for Zcool31

Did you try google? There seem to be a lot of hits relating to this. [url]http://www.google.ca/search?q=sdl_ttf+opengl[/url] You can use SDL_ttf's TTF_RenderText_Blended to get smoothed SDL text surfaces. I don't know how to convert them for use in OpenGL from there, unfortunately. I think you should be able to find this …

Member Avatar for BeautyBeast
0
1K
Member Avatar for AJones

[code] getchar(); }[/code] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1043803465&id=1043284385[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042856625&id=1043284385[/url] [quote]. . . I use the example Hello.dev from Examples directory soon after installation. How would I get this working from command line.[/quote] So, you have a .dev file that you want to compile from the command line?

Member Avatar for Wajid sardar
0
2K
Member Avatar for bops

[quote]you might also check the length of the PATH environment variable. On my computer it's so long that there isn't any room left to add more. So I have a batch file to truncate the PATH to bare necessity so that I can run other command-line programs from command prompt. …

Member Avatar for muhammad raees
0
25K
Member Avatar for MadnessCow

Declaring variables inside for loop initialization sections is indeed C99-only. I wouldn't do it if I were you. [quote]Btw, what are the differences between float and double? [/quote] double just has more precision (usually). Oftentimes, a float is 4 bytes and a double is 8. There used to be a …

Member Avatar for Adak
0
6K
Member Avatar for Coach_Nate

[url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046996179&id=1043284385[/url]

Member Avatar for rubberman
0
258
Member Avatar for Majoni

Also see this FAQ: [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048865140&id=1043284351[/url]

Member Avatar for gourav1
1
354
Member Avatar for johnray31

Your code is actually C. You're not using any C++-specific features. That's not necessarily a bad thing, just thought you should know. :) If you want to stick with C-style functions you might find strncmp() useful instead of comparing individual elements of a char[] array. You should probably also make …

Member Avatar for dwks
0
129
Member Avatar for lotsofsloths

As for keeping score, you could have two variables. [code]int games_won_by_computer; int games_won_by_player;[/code] Once you're done that game, you could try a guessing game where the user guesses a random number in as few tries as possible.

Member Avatar for ichigo_cool
-1
1K
Member Avatar for Mona..

Well a start would be to change the <= on line 13 to >=. But then you still get weird output. I'm not sure how exactly you want to break this problem down recursively. You could have one function for each line, as you're doing, but then you need to …

Member Avatar for Mona..
0
958
Member Avatar for SoulMazer

You could try here: [url]http://chrishecker.com/Rigid_Body_Dynamics[/url] I've never done this, but my intuition would be this. Gravity is applying a downward acceleration on the box; this amounts to a force applied directly downwards starting from the object's centre of gravity (for a box, this is just the centre). You can calculate …

Member Avatar for dwks
0
130
Member Avatar for minskypooh

This doesn't actually print anything. [code] if (n >= 95 && n <= 100) //print corresponding letter grade string m = "A+ ";[/code] Also, you can't just assign a string like "A" to the member variable grade, as I suspect you tried to do, since grade is an int. I'd …

Member Avatar for minskypooh
0
194
Member Avatar for Deepak20

Probably args[0] doesn't exist. This is the array of arguments passed to the program, so perhaps when you run the program with "java Sha" you should add whatever args are required, as in "java Sha arg1".

Member Avatar for Deepak20
0
202
Member Avatar for ayesha91

As mentioned, the issue is that the memory you allocated previously with [inlinecode]new int[inter][/inlinecode] is still an array with zero elements when you try to use it with [code]intersection[a] = elements[a];[/code] A slightly hackish and wasteful way around this would be to allocate size+s2.size elements for intersection (since that's the …

Member Avatar for dwks
0
166
Member Avatar for lochnessmonster

Do the functions isValidProcess() and isValidfile() throw exceptions if they find something amiss? It should do no harm to set this->fileName, which is just a string, to fileName, and then do the check afterwards. If the check fails you can always reset the variable. Why do you want to use …

Member Avatar for dwks
0
88
Member Avatar for Katya

Use code tags when you post code -- otherwise it will be an unreadable mess. This is also the C programming forum, not the C++ one, so C++ code is out of place. It's also old-style C++ code. You're using <iostream.h> and <fstream.h> etc, which are pre-standard. Use <iostream> and …

Member Avatar for alekhya.p123
0
525
Member Avatar for Fzn10

If the compiler isn't provided with a function definition or prototype at the point the function is called, it will say something like [code]warning: implicit declaration of function `foo'[/code] and if you pass it arguments [code]warning: too many arguments to function `foo'[/code] and various warnings if you use a return …

Member Avatar for sruthivin
0
96
Member Avatar for jan1024188

If you don't care what the beep sounds like just print a '\a' character. [code]cout << '\a';[/code] or [code]putchar('\a');[/code]

Member Avatar for +_+man
0
385
Member Avatar for Mobius1234

You may need to sort the data by number first, if that's the output you want. I think, however, that you should be reading in a sequence of names, assigning a number to each name automatically: so the first name entered will become 1, the second 2, and so on. …

Member Avatar for onaclov2000
0
114
Member Avatar for explorepython

The signal itself has to emit an argument if you want to connect it to a slot which accepts an argument. Otherwise, you need an intermediate function which adds the parameter in and then calls the appropriate slot with an argument. At least, this is to the best of my …

Member Avatar for explorepython
0
1K
Member Avatar for johnyjj2

Mandriva, like most flavours of Linux, has a cairo package that you should be able to install with ease. [url]http://www.google.ca/search?hl=en&source=hp&q=mandriva+cairo+package&btnG=Google+Search&meta=&cts=1262806955486&aq=f&oq=[/url] The only time you really need to install something from source or from a third-party website is when it's really unusual software that there is no package for, or when …

Member Avatar for johnyjj2
0
213
Member Avatar for hdef

Also, this (starting at line 132) won't do what you want it to. [code] while(!opFile.eof()) { getline(opFile,templine); cout << "\nTEMPLINE: " << templine; //if ((offset = line.find(search, 0)) != string::npos) { // cout << "found '" << search << "' @ offset " << offset << endl; //} } [/code] …

Member Avatar for hdef
0
144
Member Avatar for Hatem Faheem

Well, first of all, the whole if-statement only executes if [icode]E1.loc == E2.loc[/icode], which I'm assuming means that the elevators are at the same position. I'm not sure whether this is what you want. Next notice that your code has some conditions when it does nothing. Suppose, for example, that …

Member Avatar for dwks
0
114
Member Avatar for lrh9

My own personal flavour of a quine. It's not the prettiest, I haven't used Python in a while. :) [code]#!/usr/bin/python import sys before = "#!/usr/bin/python\nimport sys\nbefore = \"" after = "def escape(string, multiline = False):\n\ string = string.replace(\"\\\\\", \"\\\\\\\\\")\n\ if not multiline:\n\ string = string.replace(\"\\n\", \"\\\\n\")\n\ else:\n\ string = string.replace(\"\\n\", …

Member Avatar for dwks
0
160
Member Avatar for Silvershaft

I have never used SFML, so I can't say anything about that. But I can highly recommend the SDL: it's a great library. If you're just starting to learn it, you really should check out this tutorial, it's one of nicest out there: [url]http://lazyfoo.net/SDL_tutorials/index.php[/url] [edit] The SDL has good multiplatform …

Member Avatar for Silvershaft
0
574
Member Avatar for johnray31

Again, don't use <iostream[b].h[/b]>. Plus main() returns [b]int[/b]. Don't cast malloc() (in C; in C++ you should use [inlinecode]new[/inlinecode]). And be sure to free() (for malloc()) or delete (for new) your memory. [code] #include<iostream.h> #include<stdio.h> [color=red]#include<conio.h> #include<alloc.h>[/color] [/code] In C++, <stdio.h> should become <cstdio>. And the last two headers you …

Member Avatar for vibhu1
0
227
Member Avatar for pymatio

I'm also thinking that this [code]string todo = "/.todo.txt"; [/code] should be "./" instead of "/.".

Member Avatar for Ancient Dragon
0
231
Member Avatar for Belthemet

[QUOTE=Belthemet;966506][B]#Off topic[/B] When I was logging in, I have noticed 600,00x members registered on this forum. Congrats on the 600k! ;)[/quote] Yes, new members register at an astonishing rate here . . . when I logged in there were six less members than there are now. :) [quote]Hello. My console …

Member Avatar for Belthemet
0
258
Member Avatar for stromgren

[url=http://www.instant-registry-fixes.org/troubleshooting-and-preventing-ntdlldll-errors/]This page[/url] says that ntdll.dll is "a Native API file of Microsoft operating systems and it contains NT kernel functions". Kind of vague, but perhaps if the code is doing any system calls (accessing files, perhaps), that may account for it. Or perhaps if your program uses a lot of …

Member Avatar for stromgren
0
305
Member Avatar for Joe Shmoe

[code]char filenames[fcount][16];[/code] You're declaring a variable-length array here. It's not standard C89 to do that. If I were you I'd just declare the array as [code]char filenames[MAX_FCOUNT][16];[/code] Also: [code] //Loop through the file names for(i = F_SIZE + 4; i < F_SIZE + 4 + (fcount * 16); i+=16) { …

Member Avatar for Joe Shmoe
0
144
Member Avatar for Aprentchacker

You use -99 in your input file to indicate end of line, but you seem to expect -999 in your program . . . . Just a thought: why don't you read in one line at a time, and treat that as the row of a matrix. That way you …

Member Avatar for Aprentchacker
0
166