51,593 Topics

Member Avatar for
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
205
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
94
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
97
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
101
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
724
Member Avatar for asif08

I am writing this program which I create from the console screen. I want to change it so that I can read any file from the folder. For example: in this program, I am prompting the console for the two files and comparing them. Instead, I want to compare files …

Member Avatar for asif08
0
108
Member Avatar for RexxX

I'm better at C++ than C right now and I forgot how to use arrays in functions from main. I want to do something like [quote]void fileReader(infile[] ); [/quote]. Is infile supposed to be a pointer and if so how is it written?

Member Avatar for Aia
0
76
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
169
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
65
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
101
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
298
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
142
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
261
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
150
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
134
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
41
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
103
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 asif08

The following program is giving an error: System.NullReferenceException Object Reference not set to an instance of an object. at IgnoreKwic.GetAllLinesForIndexWords<with parameters> at IgnoreKwic.BuildOutput<with parameters> at IgnoreKwic.Main<> In the line where I wrote that I want to display the output on the screen, would this work? using System.Collections.Generic;// Adds definition of …

Member Avatar for Ramy Mahrous
0
94
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
170
Member Avatar for MxDev
Member Avatar for Duoas
0
78
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
144
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
79
Member Avatar for dc_24l

hi im quite a newbie in C#, where can i download a free C# ebook tutorial? thanks.

Member Avatar for Ramy Mahrous
-1
67
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
224
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
115
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
260
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
196
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
80
Member Avatar for manimaran_c

Need to work on an assignment in C for the following. 1. Changing the size of the cursor 2. Placing the cursor at an appropriate position on screen. 3. Drawing any graphics shape on the screen 4. Receiving a key from the keyboard 5. Checking the memory size of the …

Member Avatar for Narue
0
90
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
961
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
63
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
112
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
137
Member Avatar for jetru

Hey, I'm working on a Paint program. I've never built a proper program before so I was wondering how I should go about structuring an actual piece of software. I'm trying to a make a simple paint application (like MS paint) using C++ and the SDL library. Right now, I'm …

Member Avatar for vijayan121
0
182
Member Avatar for technogeek_42

[B]Moderator Note:[/B] Split from the thread [URL="http://www.daniweb.com/forums/thread67837.html"]C/C++ FAQ's and Practice Problems[/URL] [QUOTE=jetru;328964]projecteuler.net for the math freaks![/QUOTE] for math only ahmmm how about for game freak? do you have any suggestion for that like projecteuler.net

Member Avatar for technogeek_42
0
98
Member Avatar for Jaycii

I am trying to take my array of classes and add the values from one part of it together. I have everything ready but being able to add the parts of the array into a variable which I can use. Right now, I am using this to try and add …

Member Avatar for Jaycii
0
83
Member Avatar for nurulshidanoni

How to cal the examid like i want to call 001 and count how many exam 001 clash with 002, 003, 004...? [code] // Filename : ConflictMatrix.cpp #include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; struct student { string studentid; vector <int> examcode; }; int main() { …

Member Avatar for nurulshidanoni
0
121
Member Avatar for nu2cpp

Hi, I am using BCB6 and trying to simulate a compass. I have an image that need to rotate (clockwise and/or counter clock-wise, it doesn't matter I think). I am reading the direction data over from other computer and using that data (0 - 360) to move the compass. I …

0
59
Member Avatar for atish00

Help me with the J loop itz suppose to terminate on hitting enter to pass on loop to the outer loop for incrementing row. I tried a[i][j]!=(char)13 but it failed. [code=c++]#include<iostream.h> #include<conio.h> void main() { clrscr(); int no=0,i=0,j,k,m,price[20]; char arr[20][50]; cout<<" ================================================================="<<endl; cout<<" Food on the run Restaurant "<<endl; cout<<" …

Member Avatar for atish00
0
87
Member Avatar for atish00

How to make c++ fullscreen (sort of) in vista :- [URL="http://img167.imageshack.us/img167/4783/45870184ss2.jpg"]http://img167.imageshack.us/img167/4783/45870184ss2.jpg[/URL] Your screen should look like this :- [URL="http://img518.imageshack.us/img518/6136/sshot3td7.png"]http://img518.imageshack.us/img518/6136/sshot3td7.png[/URL]

Member Avatar for atish00
0
287
Member Avatar for ankit_the_hawk

I am starting to develop a calculator in C++ which accepts the expression in the form: 2+3 or 2/3 ,etc. ( for the time being, only two operands and one operator) Once i get that done, I will begin the process of continuely expanding it :) The problem I am …

Member Avatar for TimeFractal
0
131
Member Avatar for fudawala

I need help in writing a C++ class definition called SIMPLEST_GRADES which will evaluate the students performance. It will take the three exams of four students and takes its average of those three exams. Can you tell me what I can do to fix this program or do I have …

Member Avatar for vmanes
0
90
Member Avatar for jov0708

i would like to copy the contents of a byte array to a long variable. my code looks like this: [code] long key = 0; for (i = 0; i < 8; i++) { key <<= 8; key |= (long)(buffer[i]); //<- this line causes the problem }[/code] however, when i …

Member Avatar for TimeFractal
0
2K
Member Avatar for sarnath1980

An example of a function definition in C language is given below: char fun (int a, float b, int c) { /* body */ … } Assuming that the only types allowed are char, int, float (no arrays, no pointers, etc.), write a grammar for function headers, i.e., the portion …

Member Avatar for ShawnCplus
0
88
Member Avatar for smiles

Hi, I want to display all the text exist in this variable [CODE]char hello[]="HELLO WORLD!";[/CODE] I use this function [CODE]void Speech(char *words,int position) { char *textptr; textptr = words; WrCmd2Lcd(position); delay_ms(10); while(*textptr != '\0') WrDat2Lcd(*textptr++); }[/CODE] and call it in main function [CODE] Speech(hello,lcd_set_ddaddr+0x00);[/CODE] but it only display "HELLO WORLD", …

Member Avatar for Narue
0
74
Member Avatar for thodragon

Hi to everyone. It's my first post here and I'd like to get some help. A friend of mine has 2 (simple for you) problems to solve and she doesn't have a clue (and nether do I). Prob 1.) Write a code in C++ (visual) that reads from the keyboard …

Member Avatar for thodragon
0
137

The End.