49,761 Topics

Member Avatar for
Member Avatar for Vasthor

[Link Anchor Text](http://s7.postimage.org/wdzzqzst7/weird_error.png) I click yes, thought so, this never popup when I'm compile any file before. [Link Anchor Text](http://s14.postimage.org/6bhslq23l/weird_error2.png) can anyone explain what I'm doing wrong here, I mean, I just copied all the code given in the book (Accelerated C++), then try to compile, but fail. help? =(.

Member Avatar for Vasthor
0
224
Member Avatar for Sunshine2011

Hello, the following code doesn't work. The compiler gives the message: crosses initialization of 'std::ofstream filestream Maybe someone could explain the reason for this. switch(x) { case '7': ofstream filestream("Test.txt",ios::out|ios::app); //... break; case '8': cout<<This is a test."; break; }

Member Avatar for Ancient Dragon
0
93
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
578
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
188
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
469
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
119
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
120
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
961
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
604
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
187
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
981
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
88
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
198
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
138
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
180
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
93
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
261
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
106

The End.