49,761 Topics

Member Avatar for
Member Avatar for astala27

Writing a program that reads a string of arithmetic expression from the keyboard and evaluates the arithmetic operation in the string. Some example runs are given below. program should accept only * any real or integer numbers * four basic arithmetic operators, +, -, *, / * paranthesis ( , …

Member Avatar for arkoenig
0
2K
Member Avatar for bleedi

Hey, I'm trying to compile a simple producer-consumer program with Qt, using QThreads. I get this error message when trying to compile: [CODE] In file included from /usr/include/qt4/QtCore/QThread:1, from producer.h:4, from mainwindow.cpp:3: /usr/include/qt4/QtCore/qobject.h: In copy constructor ‘QThread::QThread(const QThread&)’: /usr/include/qt4/QtCore/qobject.h:309: error: ‘QObject::QObject(const QObject&)’ is private /usr/include/qt4/QtCore/qthread.h:60: error: within this context In …

Member Avatar for bleedi
0
233
Member Avatar for tawes01

I'm making a dialog based text editor, using dev-c++. how can I insert text at the current cursor position? as in get the location of the cursor (not the mouse) and insert text at that point in the edittext control

Member Avatar for tawes01
0
222
Member Avatar for AmerJamil

My question is when user enter any key from the keyboard including arrow keys, it should print one asterisk * , when user will again press any key it will add one more asterisk and ,and when user again press any key from keyboard it should add one more asterisk, …

Member Avatar for AmerJamil
0
233
Member Avatar for dip7

Hi. I want to read a file and scan the file to see if the file contains 0x000001 (24 bits, 23 zero and 1 one bit). if file contains 0x000001, return a "yes", else return a "no". I tried writing the program but cannot work. I am stuck with this …

Member Avatar for dip7
0
114
Member Avatar for freakyboard

My code compiles and runs but does not do what I want. It is NOT allowed to change main(). I'm trying to build Base(almost like how i typed), Derived classes and type their member functions. [CODE]//--------------------------------------------------------------------------- #include <vcl.h> #include<iostream> #include<fstream> #include<stdlib.h> #include<conio.h> using namespace std; #include <vcl.h> #pragma hdrstop //--------------------------------------------------------------------------- …

Member Avatar for freakyboard
0
102
Member Avatar for localp

I need to identify, for example, when we hit a text box in a web page, we get a "| " key sign right (Which would blink, until we type) If you don't get what i am saying, go to google and click on the search text box, u would …

Member Avatar for jonsca
0
167
Member Avatar for logicslab

Hi Pals, I am Anes , from Kerala ,India. I am a PHP Programmer Basically but have interest and now studying C++ , I plan to take data from MySql in C++, for that I install mysql-connector-c++-1.1.0-win32.msi in my Windows XP. I got a Script from net , but it …

0
117
Member Avatar for mattloto

Hi, so I finally got around to looking into OOP in c++ and I have a question about classes. So I made this simple class: [CODE]#include <iostream> using namespace std; class Shape { int xPos, yPos; public: Shape(int x, int y) { xPos=x; yPos=y; } } ; int main() { …

Member Avatar for mrnutty
0
123
Member Avatar for yUNeeC

Hey guys. First of all, I've only been a CSCI major for a semester (had one course in Java, loved it, and switched from my almost completed math major). With this in mind, I hope you can understand that I'm pretty new to the scene. That said, during the semester …

Member Avatar for Ancient Dragon
0
128
Member Avatar for localp

I am using VS2008, OS win Vista. I need to create a C++ windows form program to add a .swf flash animation to the form. How is this done. Any sample code, or a good tutorial is appreciated.

Member Avatar for localp
0
73
Member Avatar for ultrasurf123

In C++, I know that if I need to read something from a file, I can do this: [CODE=c] int x; ifstream ifs("data.txt"); ifs >> x; [/CODE] However, is there a function that simply returns the value of whatever I'm feeding in? For example, if I had this: [CODE=c] bool …

Member Avatar for ultrasurf123
0
109
Member Avatar for manzoor

How to change numerical values from scientific notation to normal system (:P) in C++ if i used a float or double variable Cuz i want decimals tthats why i used float but now its giving me the answer of my program in scientific notation ? or is there any way …

Member Avatar for floatingDivs
0
1K
Member Avatar for johnray31
Member Avatar for AmerJamil

Question : Please Copy array A into 1st portion of array F .assume float a[11], f[34]; im using compiler Borland 5.02, please tell me hows so far my code is correct? [CODE] #include<iostream> #include<conio> main() { float a[11],f[34]; int i; for (i=0;i<11;i++) { cin>>a[i]; } for (i=0;i<11;i++) { f[i]=a[i]; } …

Member Avatar for abdelhakeem
0
153
Member Avatar for BigDeveloper

Hello, Can anyone make sure the two functions are correct? First, this is function should return true if all of the nodes are positive.otherwise, false. [ICODE]bool AllPositive(Node * h); { node* current= head; while (current !=NULL) { if (current < 0) { return false; } else { return true; } …

Member Avatar for BigDeveloper
0
116
Member Avatar for hunt4me619
Member Avatar for hunt4me619

hey my mam told me that we can run any c and c++ program while booting... He tells me to figure out....... So need ur help...

Member Avatar for WaltP
0
31
Member Avatar for svatstika

Hi everyone! I'm trying to creat a class calling INT, which is equivalent to type int. I think we must creat every operator for this class like: +, -, *, /, %, pow(x,y),... I've never seen how does type int look like? May someone give me a introduction to type …

Member Avatar for mrnutty
0
202
Member Avatar for i_suck_inc++

this code was workin when i used srand function to fill th e array with random numbers and the array was a declared globally.But now the code is not working.I cant find anything wrong in this .Sombody pls help.. [CODE=CPP] #include<iostream.h> int *a,NUM_ITEMS; int main() { void enterdata(); void quicksort(int,int); …

Member Avatar for sonia asim
2
166
Member Avatar for Unhnd_Exception

This should be easy. Haven't writen a C++ app in over 10 years. Trying to delve back into it. Will someone be kindley enough to show me a sample Function and Procdure Name the function AnyFunction that returns and integer. Name the procedure AnyProcdure Heres my .h and .cpp [code] …

Member Avatar for Unhnd_Exception
0
178
Member Avatar for I am a beginner

I have this code here but it doesn't seem to work; int answer1[10]; int answer3[10]; char answer2[11]; char answer4[11]; answer1[i1]= answer2[i2] - '0'; answer3[i3]= answer4[i4] - '0'; answer2 and 4 are numbers except in charactor state. answer1 and 3 doesn't equall to answer2 and 4; Can some one help;

Member Avatar for jonsca
0
92
Member Avatar for mrcpp

Hi, I tried doing Project Euler #27 today, which asks the following: [QUOTE] Euler published the remarkable quadratic formula: n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 40^(2) + …

Member Avatar for mrcpp
0
302
Member Avatar for samaitaben

Can any one please assist with code for two objects coming from different direction. Subsequently, collide after intersection. The objects should be moving at 80km/h. And collision should happen shortly 30 minutes after take off

Member Avatar for tamiruu
0
251
Member Avatar for ziggazam

Hi i am new to programming and i decided to go straight to C++ and i am starting to grasp it. so i am trying random codes using my current knolage(Bad spelling) to make them. But i am trying an if else statement using my name and my brothers name. …

Member Avatar for ziggazam
0
105
Member Avatar for Shofahi

Hello! I am learning SDL on lazy foo site! I have a problem with this code what does it mean? what is the "/2" stand for? apply_surface( ( SCREEN_WIDTH - message->w ) / 2, ( SCREEN_HEIGHT - message->h ) / 2, message, screen ); Please help!

Member Avatar for Kanoisa
0
67
Member Avatar for goldmn480

I’ve been told to convert a standard C++ program into an object-oriented one, using the principals of polymorphism, encapsulation and inheritance. I would appreciate any help // Purpose // A program to demonstrate the application of a simple digital filter // // Overview // A sequence of data items and …

Member Avatar for Kanoisa
0
121
Member Avatar for Kanoisa

Hi guys, I have been away from programming for a while and i started back today now that i have some time again. However i have run into a bit of a brick wall. im trying to impliment a queue with a simplified interface for holding messages. What I have …

Member Avatar for Kanoisa
0
166
Member Avatar for Rubinder singh

Well the following code I used to run graphics.h functions in windows xp CODE: int driver,mode; driver=DETECT; mode=DETECT; initgraph(&driver,&mode,"c:\\tc\\bgi"); Without this code functions of graphics.h (circle, line, arc etc.) did not run But in windows 7 this code is not working c++ is showing errors ….Well I am using the …

Member Avatar for JSPMA1988
-1
226
Member Avatar for aabi

HI THERE .... CAN any one tell me; how to draw a straight line(639,0) with black color and on white back ground in borland c++ 16bit compiler; i know how to set white back ground but the straight line is a real problem if any one can ans this plz …

Member Avatar for alexchen
-1
76

The End.