49,761 Topics

Member Avatar for
Member Avatar for tennis

I got run-time error in the following simple code, but I don't know what's the problem. can any one help? [CODE] #include "stdafx.h" #include<iostream> using namespace std; void reverse (char * source) { int i=0, j=strlen(source)-1; while (i<j) {char temp=source[j]; source[j]=source[i]; source[i]=temp; i++; j--; } cout<<source<<endl; } void main() { …

Member Avatar for rje7
0
132
Member Avatar for eduard77

Hello I am reather new in c++ and I try to solve some exercises but i got blocked. Can anyone help me with this? The program should read in values until a negative value is read in. It should determine the largest value that was read in and display that …

Member Avatar for Ancient Dragon
0
81
Member Avatar for malvi

Hello everyone, I have a problem, I have to get value from edit box, store it in variable and based on that value need to update another edit box. Please tell me how can i get inter value, which is entered by user in visual c++.

Member Avatar for Ancient Dragon
0
226
Member Avatar for bonskiee

#include<iostream> using namespace std; int main() { int x,inpt,ctrl; x=1; ctrl=1; cout<<"Enter a number: "; cin>>inpt; while(ctrl<=inpt) { while(x<=ctrl) { cout<<x<<" "; x++; } cout<<"\n"; ctrl++; x=1; } system("pause"); } can u please help me to invert this triangle?

Member Avatar for prvnkmr449
0
125
Member Avatar for fire_

Hello. I'm writing codeing progam. It reads from file using fstream and then converts simbols to ascii, changes ascii, converts ascii to symbols and writes them to file. I tried to code .txt file with it. It worked perfect. But then i tried to convert .bmp file and then i …

Member Avatar for fire_
0
152
Member Avatar for charlesnazereth

I am trying to make an audio player in visual c++.I am using an audio engine called FMOD which is in a dll to call functions from it for audio playback. How do i import a .dll file to visual c++

Member Avatar for chococrack
0
162
Member Avatar for arshiyafatima
Member Avatar for Kevin Jose

heya.. im creating a quiz program...but i dont konw how to randomize the questions can any1 help me out???

Member Avatar for iustitia
0
134
Member Avatar for afg for life

hello everyone, i get this error when i try to run thsi program..its really nothing, i'm just a new programmer and this si practice but i'm stuck here :( error C2228: left of '.Text' must have class/struct/union 1> type is 'System::Windows::Forms::Label ^' 1> did you intend to use '->' instead? …

Member Avatar for afg for life
0
332
Member Avatar for headedtomexico

I have a simple class [CODE]class Info { public: long One[31]; long Two[79]; };[/CODE] i'm reading values from a couple char arrays, when I write to Two[0], it overwrites One[31]. [CODE]CurInfo->One[31] = atol(BufferOne); chatoutf("%d",CurInfo->One[31]); CurInfo->Two[0] = atol(BufferTwo); chatoutf("%d",CurInfo->One[31]);[/CODE] if I feed bufferone a -1, and then buffertwo a 623, I …

Member Avatar for headedtomexico
0
119
Member Avatar for Peter_morley

I am trying to finish up my homework but I don't really understand the question Consider the array temps that the following statements define: typedef double WeekType[DAY_PER_WEEK]; typedef WeekType YearType[WEEKS_PER_YEAR]; YearType temps; temps[12] is a one-dimensional array of seven real numbers. Suppose that you want to compute the average of …

Member Avatar for Fbody
1
191
Member Avatar for MAbebe

Can any one please help me figure out what I am doing wrong on the following C++ programing language? I couldn't figure out what I am doing wronge that it gave me a hard time to compile it. Here is what I have done so far. using namespace std; struct …

Member Avatar for chococrack
0
163
Member Avatar for rowanmck

I'm having problems with the code below, it compiles but no matter what I do it doesn't open the .csv file that I want it to. The file name is passed into this funtion then it must read the values in and then print them out, simple, yet I cant …

Member Avatar for Fbody
0
429
Member Avatar for syd919

Hello Im new to qt and I have a problem, I am trying to connect a radio button to a signal and a slot that have different number of arguments,I know this is not possible, is the any way to get around it? [code=c]here is my code: void myclass::createbutton() { …

0
49
Member Avatar for Parthmishr

I just finished writing a string class that includes functions for generating random string (why I don't know, as I have never really needed random strings before). Basically the user can pass the function an enum citing what kind of string that'd like (i.e. AllUpperCase or AllNumeric). There is also …

Member Avatar for Ancient Dragon
0
70
Member Avatar for malvi

Hello As per my project requirement i want to update edit box per second. give me an idea how can i do it?

Member Avatar for Ancient Dragon
0
160
Member Avatar for chandrut

1) how to connect c to database..... 2) how to connect C++ to Database...... Reply me its urgent.

Member Avatar for Ancient Dragon
0
113
Member Avatar for CodyOebel

Ok I am doing some windows API programming that deals with two applications\windows. One window is my program, the other is a games window. I am building my application to output the coordinates to my applications screen. The coordinates are to be retrieved and are needs to be relative to …

Member Avatar for chococrack
0
269
Member Avatar for jelinky

this is the code i have: [CODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; ifstream infile("grade_data.txt"); string answers, key; int num_grades; void highest(double [], int); void lowest(double [], int); const int NUM_QUESTIONS = 10; double scores[NUM_QUESTIONS + 1]; int results; //how many right answers int wrong=0; //how …

Member Avatar for Fbody
0
130
Member Avatar for ahem

this is the problem given to me using c++. please help me. thanks. -create a program that will prompt the user to enter how many random numbers are to be displayed. display the nos. in 5 columns. after displaying nos... output the smallest and largest number then get the sum. …

Member Avatar for Stefano Mtangoo
-1
67
Member Avatar for the rider

Hello everybody, I'm a Borland C++ 5.02 user, a pretty old package, but very good for the kind of applications I'm used to write. My problem is that I had to reinstall it on a new machine after the old one is dead, but after the installation I'm not able …

Member Avatar for carolannberdin
0
107
Member Avatar for blackmagic01021

Hello, I have a forth order equation aX^4+bX^3+cX^2+dX+e=0 How to solve the equation? I have looked at the follwing thread on a forum but I can not understand the assignment of the variables. [url]http://www.cplusplus.com/forum/general/8129/[/url] Any ideas?

Member Avatar for StuXYZ
0
167
Member Avatar for dflatt

is this good practise or even possible as i'm not on my comp. [CODE] class C3dshape { private: int mLength; int mWidth; int mDepth; public: int getlength(); int getwidth(); int getdepth(); void setvalues(); }; int C3dshape::getlength() return mLength; int C3dshape::getwidth() return mWidth; int C3dshape::getdepth() return mDepth; void C3dshape::setvalues() { length …

Member Avatar for Ancient Dragon
0
130
Member Avatar for ScalesTech

// Energy drink assignment from page 77 #18 #include <iostream> using namespace std; int main () [{ int numberSurveyed = 12,467; int energyDrinkers; int citrusFlavor; energyDrinkers =static_cast<int>(numberSurveyed)* 0.14; citrusFlavor =static_cast<int>(energyDrinkers)* 0.64; // Approimate calculations from survey print out // 14% of 12,467 cout << "Approximate number of customers who purchase …

Member Avatar for ScalesTech
-1
377
Member Avatar for Hawkpath

Hello, I made a class and now I want to store instances of those classes in an array. I looked it up and found it was as easy as: [CODE]className arrayName[x][/CODE] When I tried that I got this error: [B]error: no matching function for call to 'archerTower::archerTower()'| [/B] My class: …

Member Avatar for Hawkpath
0
112
Member Avatar for xiansen

hi guys, I've been working on this program and I am kind of lost. Please help me point out what i am doing wrong. this is the description of the program. You are to code a plane reservation application, which allows the user to keep track of seat reservations. Seat …

Member Avatar for NathanOliver
0
306
Member Avatar for ana_1234

Hi, I am in dire need of help. I have tried every way I could think up and I cant get it I need a diamond that looks like perfect rhombus with an a border: (im trying to get this site to make my shape to come out right but …

Member Avatar for ana_1234
0
139
Member Avatar for bmos31

So I have a program scenario for a postman who carries out an experiment: 1. He has mailboxes numbered 1-150 all of which are 'closed' 2. Starting with mailbox 2, he 'opens' all even-numbered mailboxes, leaving all others 'closed' 3. Next, beginning with mailbox 3,goes on to 'open' every third …

Member Avatar for bmos31
0
810
Member Avatar for vbx_wx
Member Avatar for wittykitty

I seem to be stuck in an endless loop here and was wondering if someone could help? I am writing this method to a linked list class. There are strings of words in a file that is read into the linked list. It needs to read the last string in …

Member Avatar for Lerner
0
126

The End.