49,757 Topics

Member Avatar for
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
684
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
162
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
233
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
136
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
253
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
97
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
2K
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
139
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
182
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
75
Member Avatar for tonylamb

Hi All, I seem to be getting an error with my code when running Intel C++ compiler via Visual Studio 2005. The error generated is "Expression:map/set iterator not dereferencable" I've given my code below in the hope that someone can spot the problem. [code=C++] set<stl_index>::iterator eit1, eit2=elmt_ids.begin(); bool non_consecutive(false); // …

Member Avatar for tonylamb
0
948
Member Avatar for hanifa

Hi, this is my requirement : I have a c++ library/API in the server and client computers running Java applets can send data over to the server and server after processing will send the resultant data back. What I have done: Following the excellant tutorial at [url]http://www.linux.com/feature/113947?&depth=5&order=1&sortby=3&render=flat[/url] titled "Creating Web …

0
61
Member Avatar for Darth Vader

Any ideas how this could be converted to a std::string(). So files8 will be converted to a std::string() [code] System::String ^ files8 = folderBrowserDialog1->SelectedPath->ToString(); [/code]

Member Avatar for vijayan121
0
109
Member Avatar for cranfss

(#143734) 915186754 SendMessage: sender 1, receiver 2, group 1000000000, type 24050, length 384, source 0 (#143781) 915248646 ReceiveMessage: receiver 1, sender 3, group 1000000000, type 24050, length 256, source 0 (#143658) 914941174 Collective: process 1, collective 11, group 1000000000, root 0, sent 0, received 0, duration 242440, source 0 (#143657) …

Member Avatar for vijayan121
0
134

The End.