49,761 Topics

Member Avatar for
Member Avatar for daviddoria

Hi all, I am trying to write a function to solve an equation for one of its variables. E.g. X + Y + Z = 0 This equation would be represented by its parameters: parameters[0] is X, parameters[1] is Y, parameters[2] is Z. If the user wants to solve for …

Member Avatar for mrnutty
0
732
Member Avatar for taumang

help me with this kind of program,i have tried to declare those variables but it continues to say u ndeclared identify CBDA [CODE]#include<iostream> using namespace std; int main() { float catergory A; float catergory B; float catergory C; float catergory D; const float Catergory of pair A = -999,99; const …

Member Avatar for taumang
0
91
Member Avatar for GhostMonkey

Hi, I've got an array where you enter values into it but I want the values you enter to be a separate colour from the values initially in the array. I tried simply using set colour when you enter the value but I've coded it so that after every user …

Member Avatar for GhostMonkey
0
101
Member Avatar for jnewing

Ok so I'm looking for a quick efficient way of reading the following binary data into memory. I'm currently reading it all and then have my own functions that break it up via the separators 0x7d (|) and read each on into a variable, however I was thinking about reading …

Member Avatar for jshoot
0
111
Member Avatar for kumarmpk4u

Hi, i am converting a vc++ project written in 16 bit code to 32 bit code. Am using VC++ 6.0. In the 16 bit code they have used a in build class [COLOR="Red"]cvbcontrol[/COLOR] which is not supported in 32 bit environment. CVBControl class was used in the code to display …

Member Avatar for Ancient Dragon
0
167
Member Avatar for SWEngineer

I have the following `main.cpp` file: [CODE] #include <QApplication> #include "ui_checkabder.h" #include <QDialog> int main(int argc, char *argv[]) { QApplication app(argc, argv); Ui::CheckAbder ui; QDialog *dialog = new QDialog; ui.setupUi(dialog); dialog->show(); return app.exec(); }[/CODE] And, get the following errors when trying to run the program: [CODE] C:/Users/avbder/Desktop/abder/main.cpp:7: error: 'CheckAbder' is …

Member Avatar for JasonHippy
0
154
Member Avatar for SWEngineer

When I try running a Qt application with the following main.cpp file: [code] #include <QApplication> #include "ui_checkabder.h" #include <QDialog> int main(int argc, char *argv[]) { QApplication app(argc, argv); Ui::CheckAbder ui; QDialog *dialog = new QDialog; ui.setupUi(dialog); dialog-&gt;show(); return app.exec(); } [/code] I get the following errors: c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib/libqtmaind.a(qtmain_win.o):-1: In function `WinMain@16': …

Member Avatar for SWEngineer
0
488
Member Avatar for thilinam

Hello All, Have somebody heard about a C++ library which help Agent programming like Java Agent Development Environment(JADE). Please let me know. I googled it but I could not find. Thank you ThiLiNa

Member Avatar for thilinam
0
1K
Member Avatar for mariusiacob

Any help would be appreciated with this program : I have a file with 5 lines....each line has name, id , phone ...etc... I have to read that intro an array of structures and display the results. This is what I have so far .. I doesn't not display anything …

Member Avatar for abhimanipal
0
3K
Member Avatar for lesfleurs

I am experiencing a strange error with the constructor for a binary search tree. The project is for an Hoffman Encoding scheme however the issue is whenever i insert more than two items into the STL priority queue, the copy constructor crashes. [CODE] void copyTree(myTreeNode* & copy,myTreeNode* originalTree) { cout<<"Copy …

Member Avatar for mike_2000_17
0
200
Member Avatar for Craftknight

Hello, I have been trying to get this program to work for a while now with no luck and I was hoping that someone could clear things up. My problem is the program always gives the failure to open file message so I can't tell if anything else works or …

Member Avatar for Craftknight
0
138
Member Avatar for cretaros

Hey guys im using Ms Visual C++ Compiler, im encountering this error bt i cant manage to solve it, pliz help. Attached pliz find the source code Error : 1>c:\users\h\desktop\wautil\wautil\wautil.cpp(23) : error C2144: syntax error : 'int' should be preceded by ':' 1>c:\users\h\desktop\wautil\wautil\wautil.cpp(33) : error C2144: syntax error : 'double' …

Member Avatar for sergent
0
85
Member Avatar for cafegeo

Hello everyone. I am trying to find the max values of each column in this 5 column array. I have skipped the first column because it is just the product name. The other 4 columns contain revenue of that product. The function I wrote below works for col 1, 2 …

Member Avatar for cafegeo
0
1K
Member Avatar for sha11e

I want to make a project, have 3 files: main.cpp header.h declerations.cpp where i have all the function declarations. But I'm not sure how to link them all together. When I make a header file, it automatically types the #ifndef header_h but I thoguht that should be in the declerations.cpp?? …

Member Avatar for mike_2000_17
0
277
Member Avatar for frenzra

5 code movietitle 1 Kungfu Panda 2 Hop 3 Hikayat Merong Mahawangsa 4 The Roomate 5 Pirates Of The Carribean 4-On Stranger Tides how to read this kind of data??

Member Avatar for mike_2000_17
0
98
Member Avatar for clickspiker23

[CODE] // this is main.cpp // stuck on getting the ouput of the distance NOT to be 0 i think its someting to do with the variables // in the distance method in the point.cpp file // The invokeX and invokeY are set to 0,0 cout << "The distance from …

Member Avatar for ravenous
0
137
Member Avatar for programing

hi i make code for double linkedlist.. but i didn't have a syntax erroe .. i don't know where the error . [ICODE]#include <iostream.h> struct dnode { int info; dnode *next; dnode *prev; }; class dlist { private : dnode *head; dnode *tail; dnode *current; public : void addEnd(int y){ …

Member Avatar for Lerner
0
133
Member Avatar for Khoanyneosr

So I'm learning OpenGL on my own and I have to say I'm really liking it. I really have not been able to do much, you'd laugh if i told you how much i knew but are there any real techniques for drawing shapes? I'm having trouble trying to figure …

Member Avatar for n.cramp
0
170
Member Avatar for The physicist

Hi all, I'm sure it's an error by me, but I'm having a problem with ifstream inside a loop. The reason for the loop is read in a piece of text from multiple files, and cases within the switch statement change the filename, path is previously declared. The first iteration …

Member Avatar for The physicist
0
2K
Member Avatar for asadaziz

I am working on visual studio 2008 what i want to do is read till the end of the file the code i am using is [CODE] StreamReader ^sr= gcnew StreamReader("example.txt"); String ^str; while(sr->Read()!= 0) { str=sr->ReadLine(); textBox2->Text=sr->ReadLine(); MessageBox::Show(str); } sr->Close(); [/CODE] what could be used inside while condition that …

Member Avatar for MattyRobot
0
1K
Member Avatar for BurgerBob

Hi guys, i'm doing a 7 week C++ course at the min and am struggling to keep up. Any help on the following is appreciated. Background Info: The game of craps: A player rolls two dice. Each die has six faces. These faces contain 1, 2, 3, 4, 5 and …

Member Avatar for BurgerBob
0
662
Member Avatar for yapkm01

m reading c++ primer 4th edition by Stanley Lipmann and I'm on page 92 about value initialisation. I just don't understand when about value initialisation. I browsed around and I know there are also default initialisation and zero-initialisation. Can anyone explain about value initialisation? Coming to this paragraph .. clause …

Member Avatar for yapkm01
-1
318
Member Avatar for clickspiker23

I am trying to get the midpoint between two points. one of the points by default is (0,0). The other point is entered by the user. the problem i am having is getting it to work correctly from the point class in point.cpp. it worked correctly when i put it …

Member Avatar for LevyDee
0
404
Member Avatar for jnewing

Here is Libaray 1 that I would like in the namespace "MyLib" [code] /** * lib1.h */ #ifndef LIB1_H #define LIB1_H #include <iostream> #include <fstream> #include <vector> namespace MyLib { class Lib1; } class Lib1 { public: Lib1(); ~Lib1(); int some_lib1_function(int foo); private: MyLib::Lib1 *lib1; }; #endif /** * lib1.cpp …

Member Avatar for mike_2000_17
0
94
Member Avatar for skips

I've only written one simple class before, yesterday. I am required in this assignment to use all of these functions, even though I don't think they are all necessary. I believe that my problem is just a matter of not knowing exactly how to pass one variable, which is created …

Member Avatar for skips
0
216
Member Avatar for Marrodriguez

i was wondering if anyone could help me more or less on how i could write a code in C++ that will result in image segmentation. I have made several atempts but everytime i include image.h, my compiler (DEVC++) tells me it does not recognize that variable. I would really …

Member Avatar for L7Sqr
0
91
Member Avatar for MagnetoM

I had to do a new installation of my os on a different hard drive and installed MV2010 but now there is no intellisense. How do I make it appear? On the other hard drive I had intellisense was already there but this time around it wasn't.

Member Avatar for daviddoria
0
73
Member Avatar for Derek Elensar

Ok, so I have a stupid question to ask, and I aks all of you not to ridicule one who is merely looking for knowledge. What is the difference between using [code]#include "whatever"[/code] versus using [code]#include <whatever> [/code]? I've always used the brackets versus the quotes, and have tried looking …

Member Avatar for Derek Elensar
1
13K
Member Avatar for Memo143

THIS IS NOT WORKING PLZ CHECK FOR ERRORS [code] #include<iostream.h> template <class T> class ex { private: struct node { T data; struct node *next; }; struct node *head,*front,*rear; public: ex() { head=new node; head->next=NULL; front=rear=head; } void enqueue(T x); T dequeue(); void print(); void move_next(); }; //////////////////Implementation file #include …

Member Avatar for fibbo
-2
127
Member Avatar for ziggystarman

Hi Trying to create a xml file of bookmarks using the following code... [CODE] // Create the XmlDocument. XmlDocument^ doc = gcnew XmlDocument; //Create root doc->LoadXml( L"<bookmarks><name>Favorite Bookmarks</name></bookmarks>" ); for(int i = 0; i < this->listView1->Items->Count; i++) { XmlElement^ newElement = doc->CreateElement(L"bookmark"); //Add url XmlElement^ urlElem = doc->CreateElement( L"url" ); …

0
79

The End.