49,757 Topics

Member Avatar for
Member Avatar for UberJoker

Hello everyone. Got a bit of a weird problem here. I cant seem to figure out a way to read a file with a format like this... hello what 100 200 its a string string integer integer i need to put each of those values in separate arrays. eg: array1[0] …

Member Avatar for UberJoker
0
148
Member Avatar for pramaku

Hi, Can any one tell me how to print address of a non static member functions of a class in C++. Thanks in advance.

Member Avatar for kvprajapati
0
47
Member Avatar for computerages

Hello, I have a command line program which opens other programs. I want to make it multi-threaded so multiple programs can be opened at one time. Following is my code with using thread. I tried to incorporate threads using this online tutorial, but it did not help. [[url]http://www.computersciencelab.com/MultithreadingTut1.htm][/url] [code] #include …

Member Avatar for Murtan
0
94
Member Avatar for mokia1

This is the problem Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numbering as follows: A 1 2 3 4 5 B 1 2 3 4 5 C 1 2 3 4 5 D 1 2 3 4 5 E 1 2 …

Member Avatar for mokia1
0
278
Member Avatar for nilesh89

can u show me hw to do puzzle from maze: i need ur help sir please: the instruction is like below: 1) Get all types of puzzles from maze.txt, create a menu and display them on the screen, so that users can choose the puzzle. The menu’s content must consist …

Member Avatar for jjjww
-8
85
Member Avatar for hao90

Can anyone guide me how to solve for the login problem..i think is the read file problem.. I try many ways but can't. here the code: [CODE]#include <iostream> #include <string> #include <fstream> #include <cstdlib> #include <cmath> #include <windows.h> using namespace std; class bankAccount { private: string name, loginName,loginName1; float IDnum; …

Member Avatar for hao90
0
267
Member Avatar for najlaaa

please warp code in progrmming ********* Welcome to my Hotel ********* Menu:. 1-Add inmate. 2-Display all inmates. 3-Search for inmates. 4-Delete inmate. 5-Exit program. Enter choice [CODE] cout<<"enter you name inmate"; cout"add inmate";[/CODE]

-3
43
Member Avatar for iammfa

Hi all, A year ago, I began to study the basics of the C++ language and I was able to successfully passed this stage .. Thanks to everyone who helped me in this especially [B][I]DaniWeb[/I][/B] users ..:* But always hesitate in my mind a question: what should be done later …

Member Avatar for necrolin
-1
182
Member Avatar for rafta

I have wrote this code about Soccer score using Data Structures, but it does not give me the Highest Score, Name of the Highest Score achiver and the Table of Players and their scores,points. As its getting longer and longer i am getting confused. Please help me [CODE] #include <iostream> …

Member Avatar for rafta
0
153
Member Avatar for jdrei

i'm trying to add two arrays and i can't seem to get my carry to work in my add function. for example, if array a has 1,2,3, and array b has 5,6,7, i should get 690. but since there is a flaw here, i get 680. why? can anyone point …

Member Avatar for jdrei
0
83
Member Avatar for angel1204

I am taking entry level C++ course, and I am having trouble with my assignment for this week on Sequential Files. Here is my assignment: Create a C++ console application that analyzes the contents of a text file. Your program should count the number of: lines (hint: use getline) words …

Member Avatar for Clinton Portis
0
123
Member Avatar for seeplusplusbeg

I need help creating a program. I have a text file that is 0's and 1's which create a picture. There are 33 rows and 50 columns. Every row contains 0's and 1's. what i need to do is do a program that will read the zeroes and ones and …

Member Avatar for necrolin
0
116
Member Avatar for Seriss

Part of my program displays a list of valid IDs, their pay, and a list of bad ids. Several of the values are.. empty I guess so they display as 0s. How can I keep that from happening?

Member Avatar for Seriss
0
79
Member Avatar for Darkmist

Hi, I am working on a program, it asks user for a file name and opens that file with that name, do some calculations and create a new file with the filename.output (.output is the extension) and save the contents into it. I have been working on it for a …

Member Avatar for Clinton Portis
0
265
Member Avatar for ericwshoemaker

Hi all, I have a c++ program i'm working on focusing on pointers in a circular linked list. I need to have the user specify the position of the "dog" in the line (the program is a mock dog show). Then a function checks for the specified position and returns …

Member Avatar for ericwshoemaker
0
80
Member Avatar for Instinctlol

can anyone help me convert this code from array to Vector? I need this in it [CODE]class VectorList { vector<WeatherStation> List; vector<WeatherStation>::iterator ThroughTheList; public: VectorList() {;}[/CODE] [CODE]#include <iostream> #include <string> using namespace std; class WeatherStation { string StationDesignation; //Identifies the station string StationAgent; //Who's responsible double Temperature; //The temperature public: …

Member Avatar for Clinton Portis
0
114
Member Avatar for cwarn23

Hi and I have a simple question. I am designing a c++ application but I need to be able to import pictures from file (nearly all formats) then to place the pixel colors into an array. Also when retrieving the pixel colors it needs to retrieve the RGB scale and …

Member Avatar for cwarn23
0
101
Member Avatar for Mclovin1234

Hey i need help with my program, I need to flip a coin and check how many heads and tails has been flipped. Heads = Win and Tails = Lose. What im trying to do is how do i calculate the winning totals for example what i want is Heads …

Member Avatar for Clinton Portis
0
119
Member Avatar for moods125

can someone help me do this problem An array can be used to store large integers one digit at a time. For example, the integer 1234 could be stored in the array a by setting a[0] to 1, a[1] to 2, a[2] to 3, and a[3] to 4. However, for …

Member Avatar for moods125
0
270
Member Avatar for Nikhar

Note:- I am NOT asking you to write the program for me. I am NOT asking you to do the homework for me either. All I am asking you is if you could suggest an algorithm for me. Present below are two algorithms. Can you please suggest me an algorithm …

Member Avatar for nezachem
0
130
Member Avatar for PDB1982

I'm trying to import this file [code] 45256 Rodrigues Joana 58 75 58 61 59 75 63 92 37915 Wright Michelle 98 83 56 62 63 90 57 67 81984 Williams Jenny 55 67 54 63 89 84 93 75 73984 Phaneuf Lesley 78 85 57 51 68 94 51 …

Member Avatar for Dave Sinkula
0
88
Member Avatar for daviddoria

Is there a way to see what a macro gets expanded to? I tried to put it in quotes and use printf, but of course printf just printed exactly the string. The result of: [code] #define SetMacro(name,type) \ virtual void Set##name (type _arg) int main() { printf("SetMacro(Test, int)"); } [/code] …

Member Avatar for daviddoria
0
136
Member Avatar for Weetnie

Hi, I'm having trouble finding the '@' sign in multiple lines of text. What I want to do is find the @ sign, and if I have found it, print the whole line, if not, skip it. So far I have this: [code] string input; getline(fin, input); for (int i …

Member Avatar for jephthah
0
101
Member Avatar for whitetigerx8

Hello out there. I have been racking my mind around the below code since Thursday, but I can't seem to figure out why my Search function will not find any values in the map even though I type the exact name from the text file the map is suppose to …

Member Avatar for whitetigerx8
0
96
Member Avatar for grib

Seems that I'm going to get hung up on every CandyBar exercise in this book I'm working through. Such is life. I'm doing something stupid, and I can't see it. Something appends garbage into my structure's first field when I try to give it the defaults. [code]#include <iostream> const int …

Member Avatar for grib
0
145
Member Avatar for richman0829

I thought I was following a recipe that worked, but not so. Can someone explain to me why this does not compile? (And I have yet to include a couple of constructors!) - Thanks, Rich. [CODE]//CIS 180 Rich Mansfield 0457321 12/6/09 //Lab11.1 - This program illustrates the use of classes …

Member Avatar for richman0829
0
151
Member Avatar for zobadof

I would like to make it so you enter how much you will give in (E/G £20 and £15 in change) and then it tells you how much change you get back. I will post the code and if someone could fix it so you enter amount you'll pay and …

Member Avatar for Clinton Portis
0
113
Member Avatar for trcartmill

I need to string names from a text file which the name will output no more than 29 characters and no commas. My output displays no commas, but i cant figure out how to count the characters and output no more than 29 characters in the name. I think I …

Member Avatar for Lerner
0
129
Member Avatar for fragtech

I wrote a program that compares two strings and tests to see if they are the same. Case difference doesn't matter. The problem is this: When the program is run it works only half the time. The other half the program doesn't wait for the second string to be entered, …

Member Avatar for zobadof
1
102
Member Avatar for BobRoss

I'm finishing up my simple shift cipher which takes a .txt file line by line and converts each character of the line to its decimal value and then adds an integer value (shift value) to that decimal value. The decryption procedure works the same way except that instead of adding …

Member Avatar for BobRoss
0
155

The End.