49,757 Topics

Member Avatar for
Member Avatar for jrivera

I have a hw question that asks us to create an STL funciton that takes an argument of type map<string, int> and an integer and returns vector containin all positions in map for which the integer value is found. The function works from what I can test. But I wanto …

Member Avatar for vijayan121
0
130
Member Avatar for mcook228

Would somebody mind looking at this code and giving me some advice as to the copy constructor and assignment operator overload function? When I try to use this class in my program, I get the following error: error C2679: binary '=' : no operator defined which takes a right-hand operand …

Member Avatar for officerajesh
0
373
Member Avatar for jk_bscomp

hello,,,everyone,I just want to ask a list of sites to where i could learn GUI programming in c++ for the beginners like me.i hope you could help me about this one and be one of my circle of friends.you may just add me in your yahoo messenger jk_bscomp or e-mail …

Member Avatar for wise_monkey
0
96
Member Avatar for Menuhin

Hi, I have a file in the format of: First-Name Last-Name StudentNumber Grade1 Grade2 Grade3 Any student may up to 10 grades, and I want to read the information from the text file into a vector. My question is, how can I read the file into the vector so that …

Member Avatar for John A
0
79
Member Avatar for kylcrow

Hi, I am writing a function that needs to return either a R S or P. It works fine if what I am inputing is a R S or P. If something else is enter it acts funny. Any suggestions to help me out? [code=c++] char getUserChoice () { char …

Member Avatar for kylcrow
0
93
Member Avatar for banan

hi every one, im working on a project which is the assembler of SIC language,im using a mixture of c and c++ functions in my c++ program by including <stdio.h> and <iostream.h>header files.... my problem is that im reading from file,this file contains the source code of SIC language...i want …

Member Avatar for Ancient Dragon
0
83
Member Avatar for Slavrix

i have this simple program im writing to help my dads business. thoguh it doesnt seem to be working, this is what i have currently [code=c++] #include<iostream> using namespace std; int change(double money,int onedollar,int fiftycent,int twentycent,int tencent,int fivecent); int main() { int money, onedollar, fiftycent, twentycent, tencent, fivecent; cout << …

Member Avatar for WaltP
0
111
Member Avatar for rapperhuj

,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Nimbus Sans L"; font-size:x-small } --> ahmm hi everyone i'm a newbie here at daniweb.. but i have an unfinished business(project).. guys.. pls.. help me to solve this.. or give some comments or replies in my problem.. this is my problem.. i don't know what function/s should …

Member Avatar for Ancient Dragon
0
105
Member Avatar for wujianwei

[CODE]#ifndef HUGEINTEGER_H #define HUGEINTEGER_H class HugeInteger { public: HugeInteger(); void input(); int setNumber(char []); void output(); void convertToInteger(); void subtract(); bool isEqualTo(); bool isNotEqualTo(); bool isGreaterThan(); bool isLessThan(); bool isGreaterThanOrEqualTo(); bool isLessThanOrEqualTo(); bool isZero(); ~HugeInteger(); private: char a[41]; char b[41]; int *array1; int *array2; int result[41]; }; #endif [/CODE] [CODE]#include<iostream> …

Member Avatar for WaltP
0
106
Member Avatar for teh_man

Hey all, I was wondering could someone help me on writing a file to a notepad.exe file. What i need help on is i have a gam and i want to record how many times the player 1 & 2 has won lost or had a draw. How would i …

Member Avatar for Ancient Dragon
0
94
Member Avatar for Slavrix

[code=c++] void playAgain() { char again; cout << "Do you want to play again (y/n)?: "; cin >> again; if (again == 'y') chooseOption(); else if (again == 'n') cout << endl << "Thanks for playing Connect Four, the game of the clever people!"; else cout << "Invalid Choice" << …

Member Avatar for Slavrix
0
586
Member Avatar for Mac.Z

Hi, I can't get cin.getline to work properly, I'm using it inside a for loop.. it gets the input sucessfuly when the loop is executed for the first time(i=0), but it doesn't wait to take any input on the next times..the program just moves to the next line.. [code=c++] #include …

Member Avatar for John A
0
103
Member Avatar for tech291083

Hi, I have this program in C++ and I am struggling to understand as to why I am not able to store a value in an integer declared in the program as double within the acceptable range of [B]2.2e-308 to 1.8e308[/B]. Here this page also says so in a table: …

Member Avatar for Salem
0
383
Member Avatar for faiz

hi,i have to implement multiplication of two huge integers of 40 or more digits.i've made a function in a class for its implementation but its not working.plz help if u find any logical errors in it. [CODE]void HugeInteger::multiplyHugeIntegers(HugeInteger H1,HugeInteger H2) { int carry=0; int count=0; // introduced to place the …

Member Avatar for iamthwee
0
198
Member Avatar for Rob111

Hi there, I need to make a piece of code in C that 1. opens a specified file, 2. Reads the data in the file and separates it as shown below, 3. Converts the strings into integers and then perfoms some manipulation on them, 4. returns the new values to …

Member Avatar for Rob111
0
107
Member Avatar for matk

Hello, I found the code for bubble sort in C++. With the code below th[U][/U][URL="http://www.webmaster-talk.com/#"][/URL]e output will be: 23 8 7 6 6 5 2 2 1 Is it possible that sorts the numbers so the output will show all changes. In example: 9,6,5,23,2,6,2,7,1,8 9,6,23,5,2,6,2,7,1,8 .... .... .... 23,9,8,7,6,6,5,2,2,1 Thanking …

Member Avatar for matk
0
106
Member Avatar for Slavrix

hey guys i got this iece of code on a program i am writing, and i was jus twondering if you could help me to convert it so it uses the conditional operator to make it into a 1 line code, cheers [code=C++] int total, start, stop, increment; if (total …

Member Avatar for addicted
0
144
Member Avatar for Armfelt

Hello everyone, this is my first post. As can be quite rightly guessed, I am new to C++ and struggling with some coursework. My task is to produce a program that prints out 5000 random numbers between 1-5, also printing out the frequency of each given number. I have searched …

Member Avatar for iamthwee
0
1K
Member Avatar for Devster

Hi, Wondering if I could get some help. This program is supposed to : -Input student data(firstname,lastname,student#, and a vector of Grades(up to 10 grades) with a grade and assignment name(notworking)) from a text file and store it in a vector -Have a menu system for navigation -add a student …

Member Avatar for iamthwee
0
286
Member Avatar for T-Fizz

Hi, I have written a little prgrm to help me on my job. I want to now be able to use it on other machines than the one it was written on. I wrote it in Visual C++ .NET Express, downloaded from Microsoft, the free one. The machine I wrote …

Member Avatar for iamthwee
0
79
Member Avatar for m0dernist

Hi there, i writing this progam for my parallel port hardware but i could not solve my error.Plz help me...... fatal error C1057: unexpected end of file in macro expansion Error executing cl.exe.

Member Avatar for Salem
0
181
Member Avatar for thekashyap

Hi Guys, I was just reading up Lippman to learn more C++ and came across the third syntax of new operator called "placement new". I have a specific problem where I thot I'll use it, but it turns out to be a total fiasco. :). My requirement is: I need …

Member Avatar for vijayan121
0
291
Member Avatar for kylcrow

Hi, I am trying to compile some code using a g++ GNU Compiler, and it keeps complaining. Other people have told me the exact same code compiles with their compiler. Anyone know why? Here is the code... [code=c++] #include <iostream> #include <ctime> #include <cstdlib> using namespace std; char getUserChoice(); char …

Member Avatar for kylcrow
0
124
Member Avatar for rapperhuj

how do i compare dis to a source code..?? The Database: AF - Afghanistan AL - Albania PH - Philippines: Smart, Globe(country's telephone operator) US - United States: Digicell, Movistar The ouput must be: Enter Country Code: PH Philippines: Smart, Globe pls.. give me some source code..

Member Avatar for WaltP
0
170
Member Avatar for Masood Ali

I m using oracle pro compiler to connect to the database and execute dml statement in a C++ program using visual studio 2005. when this procompiler connects to database, it creates a communication area known as sqlca. I have connected a file named test2.cpp, to databse using this compiler. Till …

Member Avatar for Ancient Dragon
0
189
Member Avatar for T-Fizz

Hi, I am writing a program that needs to search particular strings in a text file. The strings are typed in a text box by the user and then when the text file is opened, using fileDialog, the program searches that file using the string in the text box. I …

Member Avatar for Ancient Dragon
0
132
Member Avatar for squinx22
Member Avatar for Ancient Dragon
0
26
Member Avatar for shibam

Hi, I want to develop software for interactive map ( not world map) however I don't know which language can be used for also I want to make database and this data will be updated frequently.. if some one would like to help me how to figure it out I …

Member Avatar for shibam
0
107
Member Avatar for MadsenAim3r

Hi, this is Chris, and I was hoping that you guys could supply me with the code (yah, I know that you guys don't do homework, but this is an exception? :D) for making a simple "Hello World" program? Even one that asks answers of the user (for example, "Whats …

Member Avatar for John A
0
94
Member Avatar for youngone

This assignment I must read this .DAT file the instructor has given to me, and print out the information from it. The .DAT file is for a two-way array It has 6 rows and 8 colloumns well I have ran into a couple of problems [code] #include <iostream.h> #include <fstream.h> …

Member Avatar for John A
0
132

The End.