49,761 Topics
| |
Hey guys.I am not sure that what I want to do is possible but if it is can someone help me out... Well I want towrite a program which waits for input for a curtain amount of time and if no input is received it continues its execution.I will be … | |
I have a problem with the new program, it compiles and and it debugs, but when I get to the command lines and enter my function it gives me a debug assertion failure. We are supposed to be finding the sum of the area of rectangles used for close approximation. … | |
I have put values into 6 elements of the vector Numbers like below. What I wonder is if there is any function to check for the Highest value for a given range of the vector. Say I want to find the highest value from elements [3] to [5] wich in … | |
learning C++ and going through some codes. I'm puzzled by how the following piece of code works. It's from the msdn library as part of an example, and I know that the code works, but I'm puzzled by how the "%" sign works. [code=cplusplus] #include "stdafx.h" #include <stdio.h> int main … | |
Customer and Pensioner. Pensioner should be a subclass of Customer. These classes should be in their own files with separate header files. Details are below. Create a third class called Manager. The manager file can contain the main function. The Manager class should contain member functions that read a text … | |
My aim is to read a part of excel sheet for which I have written C# DLL,Now I have to call my DLL from a per written unmanaged C++ program.... plz help n plz dont suggest to create a seperate C++ client program.....coz I can't do that... following is the … | |
Can anyone tell how to print a pascal's triangle... i've wriiten a code but it is not printing the triangle as the way iwanted it to.. here is my code: [code=cplusplus] #include<stdio.h> #include<conio.h> void main() { int n,a[50][50],x,y; clrscr(); printf("Enter the number rows:\t"); scanf("%d",&n); for(x=0;x<n;x++) { for(y=0;y<=x;y++) { if((y==x)||(y==0)) { … | |
Normally I call this function like this [code] void MouseButton(int button, int state, int x, int y); ... glutMouseFunc(MouseButton); [/code] But now I would like to pass a member function instead of a "real" (non-member? whats the word for this?) function. [code] class Plot { void Plot::MouseButton(int button, int state, … | |
hi, This is a doubt about the pseudo-eof.If i have an 8 bit system, Then the pseudo eof has to be above 8 bits...so should i allocate 16 bits for every character just so that my eof can exist?..if its a 16 bit system I have to use 24 bits? | |
Hi y'all. I was wondering if someone could help me out a little bit. I have a couple problems due in my Scientific Programming class, and I am fairly lost. I posted another question in the C forum, but I think I was able to solve it on my own. … | |
I want some logic to shuffle numbers from array if a[5]={1,4,3,7,5,} then after shuffling 1,4,3,7,5 should be in any other order please help | |
First I just wanted to say thanks for all the help everyone has provided for me before. I'm sure you wanted to reach through the internet and strangle me :) . I having some difficulty with understanding/implementing a linked list class with another class. Just something as simple as interacting … | |
This is the first time I'm trying to compile code that I've written using a main program file, a .h file and a .cpp implementation file. I'm using Dev C++ 4.9.9.2 and when I try to compile my main.cpp file, I get several errors of this sort. 1 F:\COP1335C\LAB#3\Time.cpp In … | |
This goes out to only the users of Dev C++ (or people knowledgeable with this compiler). I am trying to consolidate all of the files needed to run Dev C++ onto a flash drive so I can use it on multiple computers. I have been having problems getting the app … | |
Hello again guys, I am trying to sort an array. First i must get the info from a txt file. The txt file has numbers and the only way i can put them into an array is to put them into a char array. Now my problem is i need … | |
I have a file with a network map consisting of 0's and 1's. I want to read this map into a two-dimensional array. I have the following code: [CODE] #include <iostream> #include <fstream> using namespace std; int main() { char map[22][22]; // 22 x 22 (r*c) ifstream fin; fin.open("netmap.txt"); char … | |
I am showing a printDialog like this: [code] if (printDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK) { PrintDialog(); } [/code] Now when this dialog comes up I want to print all textContents that is in richTextBox1 and I am not sure how to define that. I have begun some code like this but are … | |
I started a program that calculates an employee's weekly gross pay when the user inputs hours worked and hourly pay rate. With what I have so far, it compiles fine, but gives these errors: on Dev-C++: message: [Linker error] undefined reference to 'get_pay(float, float)' Id returned 1 exit status file: … | |
I got this error message: error C2447: '{' : missing function header (old-style formal list?) What does it mean? How can I fix this? Please let me know. Thank you! I started with... #include <iostream> using namespace std; int num; { and then i added my variables... | |
i want to write a c++ program that reads the original price of the item sold, the percentage of the mark up price, and the sales tax rate. the program then outputs the original price of the item, the percentage of the mark up, the store's selling price of the … | |
can anyone recommend me a website with a sample of socket which can help me create a 2-player game in c++, or much better, a game using socket?tnx | |
where can i download windows.h and mmsystem.h header file(for my turbo c++ v3.0) | |
hi gud pm!!!! i have a problem the compiler says that in this code..."name lookup change ISO 'for' scoping then using obsolete binding at i"... please help badly!!!! for (int i=0; i<20; i++){ r [i]=0; } switch (ch){ case 'a': cout<<"Please enter your password first\n"; if (ch=='a' && r[i]!=0){ clue(); … | |
Can anyone help me understand function polymorphism ? | |
Help me please i need a code for this menu.... Menu a) Clue b) change password c) Exit i need it badly please.... the password for this code is for string, and char. no numbers..... please can someone make me one for this......... | |
Here is the code: [CODE]#include <iostream> #include <fstream> #include <iomanip> using namespace std; int main () { ifstream fin; ofstream fout; int item1=0, item2=0, item3=0, item4=0, item5=0, amount; char item; fin.open("input.txt"); fout.open("output.txt"); if(fin.fail()) { cerr << "Input did not open\n"; exit (2); } if(fout.fail()) { cerr << "Output file did … | |
Hey, ive debugged my program to this line, and im not sure what to use, strcpy or some other thing, but i need to get the string from a[x] in to the new string c[z]. Any suggestions? [code=c++] string a[100]; string c[100]; if (a[x].compare(b[y])==0) { c[z] = a[x]; //doesnt work … | |
can any one help about this data type __int8, visual studia.net c++. How to define it.And if u can, can you show mee alittle program to see how it works. Thanks alot | |
Hi. I got some experience with win32 programming but I fell I'd like some pointers for this. I'm doing this program for fun and to learn. Program: I'm gonna do a program/bot that automates the mouse movement and clicks instead of a human actually touching the mouse. So my friend … |
The End.