49,761 Topics

Member Avatar for
Member Avatar for risa

Scenario: I hav set a timer using SetTimer(),after timeout my application gets a WM_TIMER and it exits. I Want: to pause this timer before a particular process and again restart it when the process gets over,so tht there is no timeout during this process and my application doesnt exit during …

Member Avatar for Ancient Dragon
0
289
Member Avatar for jimJohnson

Guys I am completely lost....what I want to do is make a loop to where the code im about to show. The issue is I need when I type a negative number in hotdogs, tacos, etc to make me type an error message and stop the code...here is my code …

Member Avatar for jimJohnson
0
148
Member Avatar for kalpana0611

hi everyone I am writing a program using C++. The program converts a text file into a xml file. it reads in one input file and outputs it to another file. The thing is I have 10 folder and each of these 10 folders consists of 58 text files, I …

Member Avatar for kalpana0611
0
198
Member Avatar for evilseed187

I was creating a hangman game for my intermidate programming class when i was combining all my classes together within my program and zipped it up to submit to my teacher she said that my .cpp and .h files where not in the program can anyone tell me what might …

Member Avatar for Nick Evan
0
90
Member Avatar for nurulshidanoni

How to correct the output, because for the bold it follows every studentid. [code=C++] /*------------------------------ Programming to coutn the examids ------------------------------*/ #include <iostream> #include <fstream> #include <string> #include <algorithm> #include <vector> using namespace std; struct student { string studentid; vector <int> examcode; }; int main () { int mycount; { …

Member Avatar for WaltP
0
95
Member Avatar for nickthedivil

Please help this loop won't step out. It keeps asking for input 3 times even when the inputs are correct. [code] //login with loop #include <iostream.h> #include <stdlib.h> #include <stdio.h> // for gets int main() { char charname[15],charpassword[15],chartryname[10],chartrypassword[15]; int inttrys; cout<<"Please enter a user name to setup "; gets(charname); cout<<"Please …

Member Avatar for WaltP
0
99
Member Avatar for Exo1337

Okay, so i need to enter a random number that is in centimeters, this will then be converted into Yards, Feet, and inches... all of these must be integers in the output and should look something along the lines of this. Example Output: 3 Yard(s) 20 Feet 6 Inches The …

Member Avatar for WaltP
0
703
Member Avatar for c++noobie

I am fairly new to C++, as I began learning it two days ago, with some very basic background in java and python. I was trying to write a code that could simply store, recall, and delete entries in a class I named address_book. I did it first without using …

Member Avatar for Dave Sinkula
0
2K
Member Avatar for Sgt. Pepper

Ok, no matter what compiler i use, i can never find a compiler that will build/compile/run a single file like the one I have used in my school. i got Code::Blocks to compile my test file the code is short: // Test file [code=c++] include <iostream> int main() { cout …

Member Avatar for John A
0
164
Member Avatar for nurulshidanoni

to Anybody who know how to solve this problem.. I build my programming and I click the properties to open for a large windows for and save for permanently windows. But when I build it again, for the button c++ (blue colour) it missing and I cannot copy the output …

0
64
Member Avatar for number87

erm im trying to create a function to test if an array/matrix is symmetrical that is for example a[i,j] = a[j,i] i think i got the symmetrical test function correct....just that i dont know where to put that if-else statement. it just doesnt seem to fit anywhere in my codes. …

Member Avatar for number87
0
1K
Member Avatar for Jennifer84

I am using a browserdialog to browse to a folder that I know contains .txt files. When pressing okay. I want all these .txt files to appear in my textFilesBox1. I have come up with this code that do put the path directory in the textBox1. I have searched for …

Member Avatar for Ancient Dragon
0
100
Member Avatar for number87

for this prob i have im supposed to cin a string of letters uppercased from A-H for example if i cin ABACDEFGH my prog should return them as such AA B C D E F G H however i came up with functions which are able to count the number …

Member Avatar for technogeek_42
0
265
Member Avatar for VersEtreOuNe

What I need to do i something like this: [B]ClientData.h[/B] [code=c++] #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string> using std::string; class ClientData { public: ClientData(int = 0, string = "", string = "", double = 0.0); void SetAccountNumber(int); int GetAccountNumber() const; void SetLastName(string); string GetLastName() const; void SetFirstName (string); string GetFirstName() …

Member Avatar for WaltP
0
138
Member Avatar for SteveDee

I am teaching myself C++. I am writing a lotto program to read in dates and numbers and update a file. This code snippet: [CODE]int numberset[6]; cout<<endl<<"now, enter the 6 numbers. Hit return between each number:"; for(int i=0;i!=6;i++){ cin>>numberset[i]; while(numberset[i]<1 || numberset[i]>53){ cout<<"the number is not a valid, lotto number! …

Member Avatar for WaltP
0
255
Member Avatar for vtskillz

Hi I was wondering if someone could help with linked list. I'm trying to read i a text file in this format: ID Name PR Salary 339 GOERGE 4 26000 221 SANDY 4 22600 101 RONNY 3 35250 and put it in a linked list. I have this much so …

Member Avatar for VernonDozier
0
1K
Member Avatar for stk123

Hello, if I compile this code it crashes at the if statement comparison. Giving me an access violation. it is meant to check, wether the elements stored in the linked list are ascending. I would really appretiate help. Thanks stk123 #include <fstream.h> typedef char Item; class Node { public: Item …

Member Avatar for Duoas
0
148
Member Avatar for CodeBoy101

I'm trying to make a shooting video game in conole mode but the game pauses to recieve an input from the key board. Ho can I get around this? How do game engines work? DFor exaple in a game like pac-man where the ghosts and other elements in the game …

Member Avatar for CodeBoy101
0
132
Member Avatar for mrjoli021

I am getting this error when trying to complile the main program. the .cpp and the .h files compile fine, but not the main. Error 1 error LNK2028: unresolved token (0A00004A) "public: void __thiscall MyEmail::Createfile(void)" (?Createfile@MyEmail@@$$FQAEXXZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ) test.obj e-mail main code #include "stdafx.h" #include …

Member Avatar for mrjoli021
0
38
Member Avatar for curt1203

I have this assignment to do and i am confused on how to start this one. I am very new to programming and it would help me out a lot to see how someone with some programming skill would do this one. I learn more from observation so any input …

Member Avatar for zandiago
0
99
Member Avatar for johnRiley

Hi, I'm trying to do a vector of stringstreams so i can edit/manipulate them using vector functions as i have already done using strings. everything was going fine using... [code] std::vector<std::stringstream> myVector [/code] However i'm getting the error "cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>'" on this line... [code] …

Member Avatar for johnRiley
0
3K
Member Avatar for kux

i have a problem... i wanna make a function that takes a string as input splits it, storing the resulting strings in a vector<string> and then sort it [CODE] #include <iostream> #include <vector> #include <iterator> #include <sstream> using namespace std; vector<string> split( const string &sInput ) { istringstream is( sInput …

Member Avatar for kux
0
168
Member Avatar for MxDev
Member Avatar for Duoas
0
75
Member Avatar for sanzle

[code] #include<iostream> using namespace std; void merge(int a[],int low,int mid,int high); void mergesort(int a[],int low, int high) { if(high>low){ int mid=(low+high)/2; mergesort(a,low,mid); mergesort(a,(mid+1),high); merge(a,low,mid,high); } } void merge(int a[],int low,int mid,int high){ int t[(high-low)+1]; int il=0; int ir=0; int nl = mid - low + 1; int nr = high …

Member Avatar for zhelih
0
141
Member Avatar for nurulshidanoni

for the colum and row, how to fill the space with examcode automatically, below, I must put one by one.. [code=C++] /*------------------- Two dimensional array -------------------*/ #include<iostream.h> #include<fstream.h> #include<iomanip.h> ifstream infile("STA83EXM.txt"); void main() { const int row = 139; const int column = 139; int matrix[row] [column]; //**************creates Matrix**************** int …

Member Avatar for Lerner
0
76
Member Avatar for Darth Vader

I am using GetFiles(string,string) to find .txt files in folders. The code that I am using look like this: [Code] folderBrowserDialog1->ShowDialog(); System::String ^ files3 = folderBrowserDialog1->SelectedPath; this->textBox1->Text = Directory.GetFiles(files3,"*.txt"); [/code] The compiler says that "Directory" is a undeclard identifier and left of .GetFiles must have class/struct/union. I am not sure …

Member Avatar for Darth Vader
0
219
Member Avatar for atish00

alingment : [QUOTE]DOTS REPRESENT SPACES DESIRED OUTPUT Item................................................Price Burger..............................................100 pizza.............................................. ..50 patty................................................ 25 coke.............................................. ..10[/QUOTE] OUTPUT BY PROG. [code=c++] Item Price Burger 100 pizza 50 patty 25 coca-cola 10[/code] DISPLAY CODE [code=c++]for(k=0; k<no; k++) { cout<<endl; for(m=0; arr[k][m]!='\0'; m++) { cout<<arr[k][m]; } cout<<" "<<price[k]; }[/code] Interger array input without asking …

Member Avatar for Nick Evan
0
110
Member Avatar for Marijan

I am kind of a beginner in C++,started learning the language this year at university. The next day I have an exam.One of the problems that needs to be solved with C++ includes a making a program that by entering a any word(Ex.:"Table")would reverse it,so it would look like :"Elbat". …

Member Avatar for Marijan
0
256
Member Avatar for augussk

Hi, I am programming in VC++/MFC to make applications for Bus, Airline and other ticket booking softwares. In those applications i need to display the available Buses/Flights in as in Web pages. i.e., like tables. A row for a flight like that. Currently I am making such a view by …

Member Avatar for augussk
0
186
Member Avatar for raddix

I am using the following to convert serial data over a com port into a deque. The problem I am having is that while data is streaming and things get busy the program tends to crash on this. It works fine for awhile, sometimes hours, it is a multithreaded program, …

Member Avatar for raddix
0
76

The End.