Posts
 
Reputation
Joined
Last Seen
Ranked #401
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
100% Quality Score
Upvotes Received
12
Posts with Upvotes
12
Upvoting Members
9
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
9 Commented Posts
~70.4K People Reached
About Me

student

Interests
C++, video games, Latin

202 Posted Topics

Member Avatar for Wiki_Tiki

It has to do with the way your compiler is interpreting strings (I think it happens when you set the character encoding to unicode instead of multibyte, or something like that). I [i]think[/i] that this: [CODE]PlaySound((LPCWSTR)"beep.wav", 0, SND_LOOP|SND_ASYNC);[/CODE] will work.

Member Avatar for sahana_3
0
692
Member Avatar for mattybennett

[QUOTE]Simple - because I must.[/QUOTE] You [I]must[/I]? Was it assigned to you for your job or something? I don't have any industry experience, but I'm pretty sure a decent boss wouldn't give a huge project like this to a single person with limited programming experience. VernonDozier's suggestion of breaking up …

Member Avatar for joel.queiroz
0
2K
Member Avatar for DarckHalf

Gears of War had 32 people JUST on programming (12 were listed under "Unreal Engine Programmers"). In total, around 150 people from Epic Games alone worked on the game. Bioshock (surprisingly to me), had less, around 24 programmers listed in the credits. I was too lazy to count all of …

Member Avatar for roax206
0
713
Member Avatar for sarvari

They can also be passed as pointers, if you want to use them. Thought I believe it's considered better to use references over pointers when possible. [CODE] class MyClass { // blabla }; void foo(MyClass* obj) { // class passed by reference } int main() { MyClass myclass; // create …

Member Avatar for L7Sqr
0
1K
Member Avatar for CoolGamer48

Hey, I'm a C++ programmer, but I'm beginning to learn Java, and from what I see so far the two languages are very similar. The main difference I hear is that C++ has pointers and Java doesn't, but from my understanding Java does have pointers in a sense, the user …

Member Avatar for stultuske
0
907
Member Avatar for yap.nice

It is considered one of the "harder" languages, but as AncientDragon said, hard is a relative term. C++ was really the first language I learned, and I didn't have any real experience with other languages. So if you want to learn it, don't hold back because it's "hard".

Member Avatar for akilank
0
159
Member Avatar for soroush68

I ran this for fun. Is it necessary to cast the addresses as ints before subtracting? I printed both addresses, and saw that they were 4 apart, but [ICODE]&x[1] - &x[0][/ICODE] came out as 1. But when I cast them to ints, it was 4. Why is the cast necessary?

Member Avatar for bharath404
0
257
Member Avatar for Geek-Master

Sorry for reviving a dead topic, but... I still don't have nearly enough programming knowledge to know what everyone was talking about here, but I think I almost sort of get pointers. I couldn't help but think of a database and UID's. IF you had a database of customers and …

Member Avatar for new programer
0
490
Member Avatar for CoolGamer48

Hey, Right now I'm using XP, and I was thinking of getting a laptop. Now, I've heard a lot of bad stuff about Vista, but most of the things I heard are "It sucks." Or "don't get it" or "it's extremely slow". Now, except for the last one those are …

Member Avatar for seemabaalm
0
377
Member Avatar for CoolGamer48

I've been trying to code a catch me game (for anyone who doesn't know: a game with a ball that randomly jumps around the screen - the goal is to click the ball before it moves, and not to miss it). I've got the clicks part down. You can click …

Member Avatar for twatface4000
0
157
Member Avatar for NickyU

People have already done the work for you. The Direct3D extensions library (d3dx) has functions for loading bitmaps into Direct3D surfaces or textures. Unless you want to manually load the bitmap into your program as a learning experience, or if you just feel better doing things yourself, use Direct3D (or …

Member Avatar for mrnutty
0
729
Member Avatar for CoolGamer48

On a laptop running Windows XP, I can't seem to view webpages or actually connect to any server. Going to pages in IE or firefox give me unable to connect/cannot display errors. Trying to ftp to a server through windows explorer or filezilla gives me simmilar errors. Everything I do …

Member Avatar for RJCO
0
180
Member Avatar for CoolGamer48

Hey, I download DarkGDK for Visual C++ 2008 Express (also downloading the correct version of the Direct X SDK). I just saved the SDK in some random directory, so when I try to execute the test code, i get an error telling me d3dx9.h can't be found. So, where do …

Member Avatar for Sepiantum
0
496
Member Avatar for CoolGamer48

I have a child of std::exception defined as: [CODE=c++] struct image_load_failed : public std::exception { image_load_failed(std::string const s) : message(s) {} virtual ~image_load_failed() throw() {} const char* what() const throw() { return "image load failed";//message.c_str(); } std::string const message; }; [/CODE] (I would normally have what() return message.c_str(), but I've …

Member Avatar for CoolGamer48
0
506
Member Avatar for DonkeyKong92

If you're on windows, a common way to do it is [ICODE]system("PAUSE");[/ICODE]. It gives a prompt like "Press any key to continue..."

Member Avatar for Kungpao
0
174
Member Avatar for CoolGamer48

I'm trying to load a bitmap into an Image object using the following code: [CODE=Java] System.out.println("Point A"); System.out.println("Point B"); m_image = Toolkit.getDefaultToolkit().getImage(getClass().getResource(filename)); System.out.println("Point C"); MediaTracker mt = new MediaTracker(null); System.out.println("Point D"); mt.addImage(m_image, 0); System.out.println("Point E"); try { System.out.println("Point F"); mt.waitForID(0); System.out.println("Point G"); } catch (InterruptedException ie) { System.err.println(ie); System.exit(1); } …

Member Avatar for Ezzaral
0
179
Member Avatar for naina_gill

[QUOTE]graphics is not part of either c or c++ languages.[/QUOTE] I think he meant that he has not learned how to create programs that use 3D or advanced 2D graphics (like those used by a game) in C++ yet. Obviously what you said was correct, but someone who hasn't made …

Member Avatar for vandenzergen
0
254
Member Avatar for CoolGamer48

Does anyone actually use the .hpp file extension for C++ header files? I've never seen it used, but I was just working with geany, and I noticed that it only syntax highlights C++ specific things if the file extension is .hpp (or .cpp, obviously, but not .h). So what's the …

Member Avatar for ArkM
0
139
Member Avatar for CoolGamer48

Hey, I just recently ran into a problem compiling a C++ project (no, I didnt mean to put this in the C++ forum). I got an error saying that a certain header file couldn't be opened (I had compiled with the same file before). I looked up the error and …

Member Avatar for dickersonka
0
152
Member Avatar for kudusan

It would be very difficult to write a game with C++ without the use of a graphics API like Direct3D or OpenGL. The only real function you have with Win32 programming is DrawPixel() (or is it SetPixel()...something like that). Loading bitmaps like that would be VERY difficult.

Member Avatar for Salem
0
306
Member Avatar for CoolGamer48

I'm trying to upload .js files onto my sever. This is the code: [CODE]<html> <head> <title>Add Ubiquity Command</title> </head> <body> <form action="add_ubiquity_cmd.php" method="post" enctype="multipart/form-data"> Name: <input type="text" name="name" /><br /> Description: <textarea rows="8" cols="30" name="description"></textarea><br /> JS File: <input type="file" name="file"><br /> <input type="submit" value="Add Command" /><br/> </form> <?php if(isset($_POST["name"])) …

Member Avatar for Atli
0
110
Member Avatar for CoolGamer48

Does mysql_real_escape_string() escape HTML character entities? I want people on my comment board to be able to post quotes in their comments, but they get escaped as raw ascii, so I run them through htmlentities() first, but it doesn't help. I only get it to work when I remove mysql_real_escape_string(), …

Member Avatar for Atli
0
162
Member Avatar for CoolGamer48

Hey, Are any of the brands of memory considerably better than any of the others? Should I worry about that, or should I worry more about the actual memory I'm getting. thanks.

Member Avatar for forumdude123
0
127
Member Avatar for CoolGamer48

Hey, I'm a first-time builder, and I just have some questions about what components to get. 1. How many watts do I need for my power supply? I know there are calculators for that online, but I'd rather get a rough estimate from a human. I'm getting an Intel Core …

Member Avatar for jermaghs07
0
181
Member Avatar for CoolGamer48

Hey. I've never worked in industry, and I was just curious as to how exactly things work in the real world (as a C++ programmer). To be a bit more specific, what kind of things do you do in a day? If you're working on a program, how many people …

Member Avatar for William Hemsworth
0
185
Member Avatar for blud
Member Avatar for newb1e
0
883
Member Avatar for CoolCheech

There have been a few games that were cross platform. Shadowrun combined players from both Vista-PCs and Xbox 360s, though these are both Microsoft platforms. It is definitely not impossible, but the extra work it takes may be more than developers are willing to do given the benefits of the …

Member Avatar for sDJh
0
143
Member Avatar for CoolGamer48

Hey I'm writing a color class, and I want to have a constructor that can take in an unsigned int like 0x00FF00FF and interpret it as fully opaque green. I have code for that (I think it should work, could someone check it?): [CODE] rzb::color::color(unsigned int hex) { m_red = …

Member Avatar for ArkM
0
243
Member Avatar for CoolGamer48

Hey. I'm planning on buying a desktop, but I'm a little confused as to the difference between 32-bit Vista and 64-bit Vista, and exactly what those differences entail. Now, I think the technical difference is the size of the memory bus. Well, if I'm right, I'm not exactly sure what …

Member Avatar for CoolGamer48
0
140
Member Avatar for CoolGamer48

Hey, I've been trying to create an RPG, and I really have trouble moving with it. I really can't find any decent tutorials (or even books). The only book I've heard of (Making RPGs with DirectX, or something, by Jim Adams) got pretty bad reviews. The part I can't really …

Member Avatar for Ezzaral
0
866
Member Avatar for STUDENT#101

Do you indeed want to make it have a GUI? If so, follow linux0id's advice - you're going to need to use some sort of API.

Member Avatar for STUDENT#101
0
141
Member Avatar for CoolGamer48

Hey, I'm learning Objective-C, and they use [ICODE]#import "File.h"[/ICODE] instead of [ICODE]#include "File.h"[/ICODE]. The tutorial I'm using says that import is like an include once thing, and it basically implements the #ifndef blocks that's normally done manually in C++. I was just wondering if this is something specific to Objective …

Member Avatar for Radical Edward
0
148
Member Avatar for robertmacedonia

@williamhemswort namespaces shouldn't end with a semicolon (though AD didn't point that out so I'm not sure I'm right about that...). I also don't think non const variables can be defined outside a function, though I could be wrong about that as well. Not sure what's wrong with the using …

Member Avatar for William Hemsworth
0
256
Member Avatar for Manutebecker

[QUOTE=Duoas;666121]The [b]rand[/b]() function does not return a pointer to an int. It just returns the int. ([URL="http://www.cppreference.com/stdother/rand.html"]reference[/URL]) So attempting to [b]delete[/b] it is causing your error. [/QUOTE] Wait, are you talking about this line: [CODE] *drawn = rand() % 52+1; [/CODE] rand() returns an int but drawn has been dereferenced …

Member Avatar for JaR
0
116
Member Avatar for linux0id

Any method of the mainFrame class has access to both m_library and m_player. So you can have a method called GetNextTrack() (or w/e): [CODE] class mainFrame : public Gtk::Window { public: void GetNextTrack() { //m_library and m_player can both be accessed in this scope } private: library *m_library; player *m_player; …

Member Avatar for linux0id
0
97
Member Avatar for ++C LOVER

Post the errors and a description of your problem/question. edit: Sorry, didn't see the comments in your code. Still good to post a description of the issue though. I see a couple of strange things, but the one related to your union: [code] union { int number : 4; }; …

Member Avatar for Alex Edwards
0
579
Member Avatar for Shadoninja

You would use ifstream to read data (much like cin), and ofstream to write it (like cout). (note: cout and cin are objects of classes that are already made. ifstream and ofstream are actual classes). To write data: [CODE=C++] ofstream fout("file.sav"); fout << health << "\n" << mana << "\n" …

Member Avatar for kidprogrammer
0
359
Member Avatar for osirus0830

Don't use spaces between in the code tags for them to work. That code is swapping the variables word[i] and word[j]. Temp is needed to do the switch (at least the way it's being done here). Say you have a bucket A full of orange juice and bucket B full …

Member Avatar for gregorynoob
0
185
Member Avatar for Cosa

The reason the line you commented isn't working is because [ICODE]save.dna[i][/ICODE] is of type char, but [ICODE]"T"[/ICODE] is of type char* (I believe, maybe it depends on the compiler?). Try changing it to [ICODE]'T'[/ICODE]

Member Avatar for Lerner
0
141
Member Avatar for davidleeis14

For reading data from text files: [URL="http://www.cplusplus.com/reference/iostream/ifstream/"]ifstream[/URL]

Member Avatar for Agni
0
4K
Member Avatar for gispe

1. You didn't listen to one of the above posters. Don't do this: [CODE]cin >> name; [/CODE] If I type a name that's larger than 20 characters your program will crash. 2. Unless this is for a class and your instructor says you must use character arrays, use std::strings. They're …

Member Avatar for CoolGamer48
0
335
Member Avatar for krebstar

[QUOTE=chanda gul;664838]i think instead of directly assigning one string to another u should use strcpy function..try it...[/QUOTE] Kind of off topic, but strcpy() is meant for use with C-Strings (i.e., char*). When using std::strings (which you should :) )you use the (overloaded? ) assignment operator.

Member Avatar for krebstar
0
192
Member Avatar for brizhou

Are you on a console? If so, I don't think there's a good, definite way to do that (though I could be wrong).

Member Avatar for CoolGamer48
0
83
Member Avatar for NickyU

[ICODE]( x || y )[/ICODE] is an expression of type bool (at least I think so - even though you can't declare variables of type bool it still exists as a type) [ICODE]true[/ICODE] is of type int. I believe this comparisan of int to bool is causing the issue (though …

Member Avatar for NickyU
0
249
Member Avatar for Ccrobinson001

Always post your errors! [CODE]struct Weather[/CODE] What is this? The syntax is improper and I'm not sure what you're trying to do. [CODE] month[0] = January; month[1] = February; month[2] = March; month[3] = April; month[4] = May; month[5] = June; month[6] = July; month[7] = August; month[8] = September; …

Member Avatar for Ccrobinson001
0
4K
Member Avatar for lil_panda

I don't know which [I]awesome[/I] games you saw at the apple store (especially because apple isn't too well known for games), but even if you were using C++, you would not be able to create a game like Empire at War on your own. My guess is 20-30 programmers alone …

Member Avatar for invisal
0
239
Member Avatar for Hummy

What exactly is mouse handling? Do you mean reading mouse input? DirectInput is an expensive solution - there may be some simpler methods in the Win32 API.

Member Avatar for Duoas
0
110
Member Avatar for Spartan552

This: [ICODE]module = new MyClass(true);[/ICODE] line should not work in either case. [ICODE]module[/ICODE] is of type MyClass, but [ICODE]new MyClass(true)[/ICODE] is of type MyClass*. That assignment shouldn't work - are you sure the latter example compiles? Also, use [noparse][code][/code] tags, not [quote][/quote] tags.[/noparse]

Member Avatar for Duoas
0
242
Member Avatar for CPPRULZ

Always post the exact errors you get for the best help. [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/atoi.html"]atio()[/URL] takes input of type [ICODE]const char*[/ICODE]. do this: [CODE] x=atoi(str.[COLOR="Green"]c_str()[/COLOR]); [/CODE] Or, better yet, use stringstreams: [CODE] #include <sstream> using namespace std; int main() { stringstream ss; int x; string str = "34"; ss << str; ss >> …

Member Avatar for CPPRULZ
0
573
Member Avatar for williamnz

All you're doing is defined a method of MyClass called Cout. To, use it, you would have to call it: [CODE] MyClass obj; obj.Cout(); [/CODE] the cout you use to do things like cout << x; is not a function, it's an object. Look in to [URL="http://www.cplusplus.com/doc/tutorial/classes2.html"]operator overloading[/URL], if you …

Member Avatar for williamnz
0
2K

The End.