49,761 Topics

Member Avatar for
Member Avatar for kgNIU

Basically this is suppose to read zipcodes from a file and sorts them in ascending order then calculates the total amount processed. I am getting output, but I think my problem is somewhere in my sort function. The program pretty much runs down to the last zipcode in the file …

Member Avatar for VernonDozier
0
94
Member Avatar for danalovesc

those are the maps: [CODE] multimap<SortKey,T> firstMap; multimap<SearchKey,pair<SortKey,T>*> secondMap; template <class T,class SortKey, class SearchKey> bool GarageDataBase<T,SortKey,SearchKey>::Add(T data,SortKey key1, SearchKey key2) { multimap<SortKey,T>::iterator it; it=(firstMap.insert(pair<SortKey,T>(key1,data))); pair<SortKey,T> *mizi=&*it; secondMap.insert(pair<SearchKey,pair<SortKey,T>*>(key2,mizi)); return true; } [/CODE] I am trying to insert a pair into the firstMap and get a pointer to this pair and …

Member Avatar for mike_2000_17
0
1K
Member Avatar for ThrasherK

Here is the problem I am supposed to be answering: Suppose an expression is represented in a string (i.e., 35*4+5/(4+5)). Write a function that splits the expression into numbers, operators, and parentheses. The function takes an expression as the argument and returns a vector of strings. Each string represents a …

Member Avatar for ThrasherK
0
411
Member Avatar for effizy

Hello all, I am working on a couple of programs and having similar problems with both, not sure what am doing wrong and would appreciate help as usual. The first program should have a class which can store up to 10integers. Only one copy of any integer(no duplicate value. Program …

Member Avatar for effizy
0
91
Member Avatar for Layla_2401

Hi all, If anyone uses OpenSSL, I'd appreciate it if they can take a look at this code, where I'm trying to encrypt and decrypt a short test string. At first I used to get a run time error in the RSA_public_encrypt(...); and I thought that it was caused by …

Member Avatar for joneil001
0
1K
Member Avatar for malvi

Hello, Please tell me how can i generate an array in mfc, how can push element and how can initialize array? I want to make dynamic array of hexadecimal values. Thanks.

Member Avatar for Rajesh R Subram
0
108
Member Avatar for Elven Princess

[I]<<split from [URL="http://www.daniweb.com/forums/post1219054.html#post1219054"]here[/URL]>>[/I] I know this is an old post.Didn't feel like exploring this sick site just to post a new one. But seriously Daniweb sucks. Its full of ppl who think they are the greatest programmers alive and everyone else are donkos. And they dont even know anything. All …

Member Avatar for Fbody
-1
95
Member Avatar for Sodrohu

Hello and hi. I've just used Hyperterminal to connect to a Bluetooth device. So far it works and I can send data to it using Hyperterminal. Now, is there any way that I can replicate the same serial communication in a C++ program? I'm using VS 2008. Are there any …

Member Avatar for Ancient Dragon
0
200
Member Avatar for Kafana

Well, I've been doing a bit of coding here and there. I mostly mastered the simple functions, such as loops and if checks and I have a fair understanding of classes and references. I also know about pointers and several other things regarding c++. I also know how to work …

Member Avatar for Narue
0
148
Member Avatar for usustarr

I have following line of code. [CODE]test[k]->Auto->printPowerStatus();[/CODE] This prints out following 0 ON, 1 ON, 2 ON, 3 ON, 4 ON, 5 OFF, 6 ON, 7 ON 8 ON, 9 ON, 10 OFF, 11 ON, 12 ON, 13 ON, 14 ON, 15 ON I want to be able to search …

Member Avatar for Lerner
0
122
Member Avatar for rcplguy15

Hi everyone I need to be able to read each character from a text file and store them in an array here is the text file: ********************* Ace of Spades 10 of Spades 3 of Clubs King of Spades 5 of Spades ********************* Queen of Diamonds King of Hearts Queen …

Member Avatar for Lerner
0
167
Member Avatar for kamotekid08

Hi i have a problem in programming I need to search a line from a text file by just entering an identifier. Text File: "my Record.text" contents: 101,Carl Cool,500.00 102,Kurt Cobain,400.00 103,Kid Marion,300.00 the console should ask the id number.. ex. ID:101 and give the output: ID:101 Name:Carl Cool Rate:500.00 …

Member Avatar for kamotekid08
0
133
Member Avatar for katokato

Im supposed to create a program that will read 10 floating pt numbers into an array of 10 double. The program is supposed to quit on non numeric input, which i have succeeded in doing, and also the program is supposed to take an average of all of the numbers …

Member Avatar for prvnkmr449
0
92
Member Avatar for nolife

hello every body , i have just a little question , someone can tel me what the [B]difference[/B] between [B]array<Byte>^[/B] and [B]array<Byte>[/B] thank you , dr dre say's " what's the difference betwwen me and you " ;)

Member Avatar for nolife
0
162
Member Avatar for bmos31

I'm attempting to create a function getPredecessor() in which the function recieves an int in reference to a position in the list and should return a pointer to the node [U]before[/U] that position. If the position is the first place in the list, return 0. Here's my header (followed by …

Member Avatar for bmos31
0
1K
Member Avatar for praky

An unsigned integer is of 2 bits. What i wnat to do is to shift an int a right one time and at the same time obtain the A(15) bit in some variable how can i do that? i know this will perform a right shift on int a and …

Member Avatar for praky
0
111
Member Avatar for MindTrixz

Ok so we were given a homework assignment and I am having trouble with it. We are supposed to minipulate a box in the center of the screen with the input given by a user. The input values given are height and width. How can I create a box in …

Member Avatar for Valaraukar
0
111
Member Avatar for DemonGal711

I have a program that reads in a file and extracts the front of a tag and the end and puts them on their own line, but for some reason it's missing some tags. If this is my file: <tag>something</tag><tag>something2</tag><tag>something3</tag><tag>something4</tag><tag>something5</tag> It would output should look like this: <tag>something</tag> <tag>something2</tag> <tag>something3</tag> …

Member Avatar for Fbody
0
110
Member Avatar for aar0n

hi, i've been working on this problem for way too long and i can't find the answer. here's my code: [code=c] #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int N; int M; int i; cout << "Input a positive integer: "; cin >> N; …

Member Avatar for Dazaa
0
197
Member Avatar for krian11

can u define languages?? by using turbo c?? can you give an example problem by using turbo c like if statement,while,do-while,nested if,modular,and sequential........

Member Avatar for elsiekins
0
64
Member Avatar for percival

please help me in making a voting system. dont know how to tally the votes in c++.

Member Avatar for Valaraukar
0
192
Member Avatar for keeda

I saw an example of friend class on [url]www.cplusplus.com[/url], please find it below: [CODE] // friend class #include <iostream> using namespace std; class CSquare; class CRectangle { int width, height; public: int area () {return (width * height);} void convert (CSquare a); }; class CSquare { private: int side; public: …

Member Avatar for keeda
0
96
Member Avatar for Garrett2011

Beforehand I know how to define a macro in a file like header file by using #define directive but I want to know, regarding Visual C++ compiler, is there any kind of file which is specifically used to hold a macro so that we can use it anywhere in our …

Member Avatar for Garrett2011
0
214
Member Avatar for Falkoner1

Yes, I have read the sticky MANY times, however it does not help me with my problem. The issue is that I have a program where [icode]getch()[/icode] is used in conjunction with [icode]kbhit()[/icode] in order to only recieve input when the user hits a key. The problem is that if …

Member Avatar for burcin erek
2
465
Member Avatar for matlark

Hello, I am writing the code for a cash register, and I have searched the site and nothing comes back that helps me, it basically has to take the change and break it up to the fewest 100's, 50's, 20's, 10's, 5's, and 1's. I have already written the cout …

Member Avatar for suiluj
0
734
Member Avatar for burcin erek

error message is seen on the goto statement. did I miss library ? this is a part of script. #include <cstdlib> #include <iostream> #include <conio.h> using namespace std; int main() { int a = 0, b = 0, c = 0; cin >> a >> b >> c; //assume error …

Member Avatar for burcin erek
0
223
Member Avatar for 7h3.doctorat3

Hello, i need help to convert any 1, 2, or 3 digit number into words using string/array method in C++. For example, 111 should read one hundred and eleven, 011 should read eleven, 001 should read one. I would much appreciate it if you could help me solve this problem. …

Member Avatar for prvnkmr449
0
770
Member Avatar for aaronmk2

When I compile I get this error message for istream error: no match for 'operator>>' in 'in >> ((Rock*)this)->Rock::myName' I did not include the program with main because I have not used it yet. [CODE] #ifndef ROCK_H #define ROCK_H #include<iostream> using namespace std; enum RockName {BASALT, DOLOMITE, GRANITE, GYPSUM, LIMESTONE, …

Member Avatar for r.stiltskin
0
109
Member Avatar for Awah Mohamed

hey everyone i have sugested to create a new club in my school called programmers , so they told me that i have to bring a list of the club aims and they xheck if the aims are good or bad then they accept the club or no , so …

Member Avatar for budalverson
0
80
Member Avatar for lameDirt

Hello! I have been working on a game for quite a while now, it's 3d, and it's an FPS (First Person Shooter). I want to have it where you shoot the AK-47 Rifle, it makes a gun noise. I want it to be a semi auto gun, so it can …

0
27

The End.