51,592 Topics

Member Avatar for
Member Avatar for BryantFury

Hi ive made a program where it displays 10 products from a website. The customer then chooses a certain amount of those products. When the customer is finished choosing, the program will display all products the customer has chosen. Here is the full program. it works. #include <iostream> #include <fstream> …

Member Avatar for BryantFury
0
585
Member Avatar for naresh4230

Hii friends, In my QT code am using style sheet for radio button as below "QRadioButton::indicator:checked {image: url(" + strCheckedRadioButtonImagePath + ");}"\ It works fine and image is loaded but the problem is when i select the radio button a rectangle shaped dotted lines are appearing around radio button.Its the …

Member Avatar for raptr_dflo
0
189
Member Avatar for Sonia kh

I have mentioned the code for checker board made on visual studio .I dont know whats the problem with this code .. it just draw only one row of checker board on the drawing window :( help me [code] //#include <windows.h> // use as needed for your system //#include <gl/Gl.h> …

Member Avatar for raptr_dflo
0
472
Member Avatar for inspire_all

[CODE] #include<iostream.h> #include<conio.h> #define NULL 0 class node { public: int dt; node *lt,*rt; node(int x) { dt=x; lt=rt=NULL; } }; class tree { public: node *create(); int height(node*); node *mirror(node *); }; node* tree::create() { int x; cout<<"enter data(-1 for no data)"; cin>>x; if(x==-1) return NULL; node *t=new node(x); …

Member Avatar for raptr_dflo
0
126
Member Avatar for Nawaf15

It seems like the website has some changes made on it. I can't post codes anymore and if I do they look messed up. Can someone help me please? One more thing, how do I sort items saved to disk alphabitcally?

Member Avatar for raptr_dflo
0
122
Member Avatar for cryonize

I have a bit a of a problem because I have no idea what's going on in my code. Could someone guide me with this? **It has to swap the nodes themselves. ** #include <iostream> #include <iomanip> using namespace std; typedef struct node { int DATA; node *NEXT; }; node …

Member Avatar for raptr_dflo
0
964
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
163
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
253
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
613
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
202
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
996
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
90
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
200
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
140
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
217
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
120
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
183
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
150
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
95
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
163
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
264
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
206
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
190
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
106
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
148
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
116
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
108
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
160
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
117
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
225
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
126
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
155
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
196
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
333
Member Avatar for xtinab

Hello all, I'm having trouble writing a recursive algorithm to traverse a Huffman tree to encode a message. I'm sure you all know what they are. Here's my algorithm: string HuffmanCode(const char& symbol, const TreeNode<SymbolPriority>* huffman, string &code) { //Base case: you are in a leaf; if the leaf contains …

Member Avatar for histrungalot
0
1K
Member Avatar for poolet

Ok . I am writing a game that generate random 6 array numbers from 1 to 10 the program MUST be using by srand(time(NULL or 0)); Now, I want, because it's a little bit of difficult to generate series per second something that the program will generating the numbers auto.. …

Member Avatar for poolet
0
229
Member Avatar for motrcolt

Alright so my task was to make a program in C++ that when entering a year would output the date easter landed on and this is what we were given a=year MOD 19 b=year/100 c=year MOD 100 d=b/4 e=b MOD 4 f=(b+8)/25 g=(b-f+1)/3 h=(19a+b-d-g+15) MOD 30 i=c/4 k=c MOD 4 …

Member Avatar for zeroliken
0
611
Member Avatar for ashboi

C++float assigned to unsigned long y I have to write separate C++ expression for: 1) extract the 8-bit exponent field to the low order bits of y, and subtract the 127 bias. 2) isolate the mantissa field in the lower order bits of y, and insert the implicit leading 1. …

Member Avatar for histrungalot
0
89
Member Avatar for nuclear

It seems that i dont fully comprehend how rotation works. So leys say i have a cube and i do this: x = 90.0f; rotatef(x, 1.0f, 0.0f, 0.0f); Notice that my code here may be not all correct, its like that just to symbolize what i mean. So by doing …

Member Avatar for nuclear
0
4K
Member Avatar for alanso

C++ Write a program TWO (2) groups of students at a private college university are enrolled in certain special courses during the special semester. The courses are taught by different lecturers. At the end of the semester, both groups are given the same tests for the same courses, and their …

Member Avatar for alanso
0
121
Member Avatar for benjamin tan

Hi all pros, can anybody teach me write this programme in c++??? Problem Statement Write a simple Mathematics quiz application which has six selections as below: 1) To register number of participants and name 2) To set level of difficulty (level: Beginner or Advanced) 3) To start the quiz (default: …

Member Avatar for asha11
0
459
Member Avatar for FelineHazard

Hi guys, I'm learning C++ from a book and I have a question about defining unary operators: In the book I'm working with there's an example, where they define a class called point, and define ++ operator for point *as friend*. here's the example: ~~~ c class point { int …

Member Avatar for FelineHazard
0
216
Member Avatar for while(!success)

Hey guys, I am writing a program which uploads a text file into a linked list then displays a menu prompt to the user. All of my functions work fine except when I try to exit the menu/program. The program crashes and I don't see where it is coming from. …

Member Avatar for while(!success)
0
244
Member Avatar for FraidaL

This code is supposed to output a hollow square (size and symbols to be determined by the user), but it doesn't do that. First of all, if I set the size of the square to be 5, it outputs 10-5 sets of both symbols. Also the right column is in …

Member Avatar for FraidaL
0
190
Member Avatar for Aneeque

My code is perfectly working on Borland compilers but its not working on MS VISUAL STUDIO ..... please help me that how can i run this code into visual studio ...... ~~~ #include<iostream.h> #include<conio.h> #include<stdio.h> void main () { char array[11]; int temp; array[2]='/'; array[5]='/'; cout<<"Enter Date: "; for (int …

Member Avatar for VernonDozier
0
84
Member Avatar for phummon

Hola code gurus, I’m wondering if there’s a way to use a string to access a specific item in a matrix of int[X]. I have a program which uses enums as iterators to reference a large amount of data. To select an item in the matrix, the user will enter …

Member Avatar for phummon
0
335
Member Avatar for dheredhere

Hey guys! I have an encryption project for school and i have to randomly generate a 3x3 matrix. I know how to assign the values to the 2d array but i am unsure how to return the array. I know it is possible to return a vector of a vector …

Member Avatar for deceptikon
0
325
Member Avatar for 46agogo

Hi, I'm making a windows port of some tftp client / server code [from here](http://www.applied-mathematics.net/myself/myself.html) I've got the server working sucessfully with a diffrent client, however I have come to an impasse with the client code. As I keep getting a server unreachable error, having tried over my local network …

Member Avatar for histrungalot
0
486

The End.