49,755 Topics

Member Avatar for
Member Avatar for stupendousomega

Without the name, it runs fine. I read up that adding const before new could solve my problem, but it doesn't. Any ideas? include <iostream> include <string.h> using namespace std; class Player { int Health, *Strength, *Speed, *Accuracy, *Defense; char *Name[80]; public: Player (char, int, int, int, int, int); ~Player …

Member Avatar for raptr_dflo
0
162
Member Avatar for help wanted

I'm in an intro C++ class and am suppose to make a phonebook program that will show a list of commands then read in a name,number ,and notes into a file. Then be able to retrieve a name, or display the whole contact list. I'm having trouble getting the find …

Member Avatar for raptr_dflo
0
235
Member Avatar for t_daniweb

Using an appropriate definition of ListNode, design a simple linked list class with only two member functions and a default constructor: void add(double x); boolean isMember(double x); LinkedList( ); The add function adds a new node containing x to the front (head) of the list, while the isMember function tests …

Member Avatar for t_daniweb
0
602
Member Avatar for stereomatching

Code blocks are created by indenting at least 4 spaces ... and can span multiple lines class Wizard : public QDialog { Q_OBJECT public: Wizard(QWidget *parent); private slots: void what_ever(); private: QPushButton *what_ever; }; Wizard::Wizard( QWidget *parent ) : QDialog(parent) { QGridLayout *layout = new QGridLayout( this ); QScopedPointer<QTextEdit> textEdit(new …

Member Avatar for raptr_dflo
0
174
Member Avatar for Slavrix

basically what ive got going is some transformations using my own functions, ive got them working fine still using glMultMatrix but im not allowed to use that for this. im trying to make my own matrix multiplication function and im getting stuck somewhere. the matricies are all one dimensional arrays …

Member Avatar for raptr_dflo
0
971
Member Avatar for compsci91

I am studying and reviewing topics but haven't found definition that I somewhat favor, any answers for the below questions will be very helpful. * What exactly is meant by the phrase "interface for a class"? * Anyone knows any UML class diagram tutorial that they found helpful? * In …

Member Avatar for raptr_dflo
0
87
Member Avatar for Sloppos21

I have recently started learning C++ and I'm having some trouble with the following problem: "Suppose a cuboid has three sides length, depth and height. Write a C++ program that reads from keyboard these 3 sides in the form of integers, with proper input prompt/s, then display the volume of …

Member Avatar for Sloppos21
0
197
Member Avatar for compsci91

Class extStrSet inherits from class strSet. The following function down-casts from the former to the latter. inline extStrSet& ss2extss (const strSet& ss) { return *(extStrSet*)&ss ; } Can someone explain how the down-casting is accomplished by explaining each part of the expression in the return statement? Also why is downcasting …

Member Avatar for raptr_dflo
0
137
Member Avatar for 24x24

Hello, I have an assignment to convert some given jave code into c++. I am currently having an issue wherein when I run the program it tells me that: error C2660: 'approximateSqrt' : function does not take 1 arguments. Any suggestions for moving forward would be appreciated. I have the …

Member Avatar for 24x24
0
215
Member Avatar for BryantFury

Hi ive made a code which does two things. First is read from a separate .dat file a product's model number, name a proce. The second bit allows the user to choose the product model. Depending on what the user chooses, only 1 of the products is displayed. So for …

Member Avatar for BryantFury
0
116
Member Avatar for xtreme-one

Hello all, I hope this is the correct place to ask this question. I joined 5 minutes ago so first off Ill say im a absolute noob at programming- I have no idea how to program. I have tried to learn over the years but have never been able to …

Member Avatar for Ancient Dragon
0
179
Member Avatar for FelineHazard

Hi all, I am doing some c++ exercise about operator replacing. I have successfully replaced the + (plus) operator to work on a user-defined class. I understand these operators are order-sensitive: need to replace the operator for (class+int) and for (int+class). Thus, creating **two** replacements that do exactly the same. …

0
149
Member Avatar for triumphost

I have a modified a DLL called UserEnv and I decided to check out reverse engineering and assembly.. When my DLL Loads, it writes and displays a messagebox saying it's loaded.. Sorta like injection into notepad which I learned from: [How To Inject Into Notepad](http://home.inf.fh-rhein-sieg.de/~ikarim2s/how2injectcode/code_inject.html) The DLL Now looks like: …

0
92
Member Avatar for compsci91

I was just wondering is this reading a file one byte per time? int main () { FILE * pFile; int c; int n = 0; pFile=fopen ("myfile.txt","r"); if (pFile==NULL) perror ("Error opening file"); else { do { c = getc (pFile); printf("%c-",c); } while (c != EOF); fclose (pFile); …

Member Avatar for sfuo
0
162
Member Avatar for entrylvl

i graduated from Old Dominion University in may of 2011 with a BS degree in computer science and can not find a job. not because they don t exist, but because i dont have experience, which is what they all have told me, even the entry level positions i found …

Member Avatar for drjohn
0
259
Member Avatar for Huston

Hey guys, I am making a simple c++ compiler with Visual Studio 2010, but I am stuck on the converting it to assembly bit(with c++ coding). What I am trying to do is convert the code they type(in a cpp file) to assembly, then translate it to machine code etc. …

Member Avatar for Huston
0
4K
Member Avatar for compsci91

Give a main function written in C++. Your main function is to see if it has been passed exactly one command line argument (you are to check that there is exactly one), and it has the value –verbose The function will set the local integer variable foundVerbose to 1 if …

Member Avatar for nullptr
0
202
Member Avatar for _Nemesis_

Hey Guys, I've come across a strange problem in DirectX 10 that I would really appreciate some help with: When trying to render ID3DX10Mesh objects that use a particular input layout, the vertex data seems to alter slightly before the object is passed to the vertex shader. I have been …

Member Avatar for Huston
0
187
Member Avatar for triumphost

I need someone to check my bitmap class for me. I load a bitmap from a file but I cannot get it to draw to the specified window :S I'm not sure if I'm loading it right or how to get the pixel data for BOTH 32 and 24 bit …

Member Avatar for Huston
0
105
Member Avatar for nuclear

So i was simply following one of the opengl tutorials - http://nehe.gamedev.net/tutorial/loading_and_moving_through_a_3d_world/22003/ So everything works completely fine except one thing, when i load in textures with SOIL lib its not completely correct, but with GLAUX lib it works just fine but i dont prefer using GLAUX. Here is what i …

0
147
Member Avatar for ashboi

I need some help understanding the follow functions & how they work. 1) y >> 16 & 0xFF0 2) (y >> 16 & 0xFFC) << 4 3) (y >> 20 & 0xF0F) | 1 << 7

Member Avatar for rubberman
0
114
Member Avatar for Labdabeta

I am having a linker error in a file of some 3000 lines that I cannot seem to reproduce. I was wondering if anybody had any ideas where the problem could be. Basically I have a function in a header file and whenever I go to link my project it …

Member Avatar for Labdabeta
0
105
Member Avatar for compsci91

I am trying to create two functions both named maximum (which overload each other) that compute the maximum of two arguments. The first should find maximum of two arguments of type double. The second should accept two arguments of type string (not C-string types) and should return the argument that …

Member Avatar for m4ster_r0shi
0
155
Member Avatar for won212

Hi any expert know what wrong's with this? I have 102 syntax error. I am suspecting did i miss out identify #include something like #include stdio.lib or? Please help me! thanks! I have been posting entries but none of the expert solved this. So hope you do, thanks! By the …

Member Avatar for Lerner
0
115
Member Avatar for Ricky65

Hi I'm looking to upload files using http post using winsock and have a php script handle it. I've got it working fine for text files but with files that contain null characters such as exes it doesn't work. It is only copying the file buffer up to the null …

Member Avatar for bakri
0
1K
Member Avatar for Chuckleluck

Hello, Please excuse me if this isn't the correct place to post this topic. I have a friend that knows PHP, and I know C++. We want to make a PC game together. I would handle making the core game, and he would use PHP to create a server, allow …

Member Avatar for cereal
0
223
Member Avatar for BryantFury

Hi ive made a program that does 3 things. 1. lets you enter 2 words to form one word ( red + cat = redcat ). 2. opens a separate txt file. 3. checks what you entered is the same as one of the words in the separate txt file. …

Member Avatar for BryantFury
0
122
Member Avatar for amyparker1234

Hi just started C++, was forced to take the class I just need some help I have to, not watn to, but have to take C++ as my course we are given this homework, CAN YOU PLEASE HELP ME!?!? I will be forver gratfull!! You will develop a simple windows-based …

Member Avatar for Ancient Dragon
0
150
Member Avatar for Muni123

I am having some proplems with my code - I am told to create a mouse and apple game and I am having some trouble with using the array in different funtions. Here is a short version of my code - //defining the size of the grid const int SIZEY …

Member Avatar for Muni123
0
193
Member Avatar for TheWind147

Below is a merge sort function provided by my instructor, my task is to create a program that asks the user to input numbers in random and choose which type of sorting algorithm he wants to use to be able to sort the numbers, I managed to finish quick sort …

Member Avatar for TheWind147
0
323

The End.