49,761 Topics
| |
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() { … | |
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 … | |
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++. | |
#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? | |
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 … | |
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++ | |
plz help me in writting pseudocode for c++ program | |
heya.. im creating a quiz program...but i dont konw how to randomize the questions can any1 help me out??? | |
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? … | |
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 … | |
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 … | |
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 … | |
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 … | |
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() { … | |
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 … | |
Hello As per my project requirement i want to update edit box per second. give me an idea how can i do it? | |
1) how to connect c to database..... 2) how to connect C++ to Database...... Reply me its urgent. | |
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 … | |
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 … | |
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. … | |
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 … | |
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? | |
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 … | |
// 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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.