51,593 Topics

Member Avatar for
Member Avatar for ENG ISE student

I need to do this do while loop but I dont know how to exactly get it to repeat itself I got an error when I tried to compare pointer to integer and thats what i have in the code below, any thoughts as to how this should be done. …

Member Avatar for ENG ISE student
0
97
Member Avatar for BlackNinja

Hi I was just wondering if there was a way to convert a value of double to a string? And if there is what is the command? Thank You in advance

Member Avatar for vijayan121
0
72
Member Avatar for vincex200

My group as a project that is due and we don't know where to start. We attempted it and we failed several times. This is the project. PLEASE HELP US. Write a C++ program that will read data from a file, perform computation on the data, then print the result …

Member Avatar for Ancient Dragon
0
101
Member Avatar for johnnyjohn20

I am trying to filter an array with different elements in using an if statement. So far i have if ( a[i] < 0.001 ) a[i] = 0 which works but i have minus values in the array which i wish to keep. Therefore it would be ideal to have …

Member Avatar for Salem
0
142
Member Avatar for ENG ISE student

I am a beginning ISE student taking a C++ programming class and am having trouble with the simplest things. I need to write a program that reads in an address in a single line of text then outputs that address in the appropriate form. input: john doe # 1234 main …

Member Avatar for ENG ISE student
0
114
Member Avatar for quickster12

Ok im one of those people that are just completely unable to pick up C++. Im forced to take this class and i have no prior programmin experience but at least theres only a few weeks left of this. Anyway, I just want help with this assingnment. I'm not lookin …

Member Avatar for vmanes
0
92
Member Avatar for helixkod

Here is the error: [CODE] cannot convert parameter 1 from 'int *' to 'int *[]'[/CODE] here is my code: [CODE=cpp] #include <iostream> using namespace std; void findMode( int *, int, int); void selectionSort(int *[], int); int main() { int *numbers; //dynamically allocate an array int elements, //holds the number of …

Member Avatar for helixkod
0
126
Member Avatar for djJonno

Hi, First time posting here. Basically here's my project description. Implement classes for “Sets” e.g. (1,3,6) and “Multisets” e.g.(1,3,6,3,6,6). in C++. Needs to use Dynamic Memory. A single function CalculateAll(mySet1,mySet2) or CalculateAll(myMulSet1,myMulSet2) which displays union, intersection etc... Basically I must use The same function call CalculateAll to work on both …

0
64
Member Avatar for darklich13

I have a problem where the user enters in their grades from their homework and exams and then the program will tell the user what their grade is. I have everything worked out below but I am missing one key aspect. There are 12 homeworks and only the best 10 …

Member Avatar for darklich13
0
104
Member Avatar for Slate2006

I need to change the AvgGrade2 function to work with what is shown, but i do not know what to edit for it to work correctly. [code] #include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; struct ClassList { // Definition of a structure called ClassList // ClassList …

Member Avatar for Lerner
0
96
Member Avatar for coolbreeze

My program works, but I would like for the numbers to be random instead of 1-12... I know I have to do srand and I want the numbers to at least go to 50, so like a rand()%50, but I'm not really sure where to plug it in, if thats …

Member Avatar for danzona
0
99
Member Avatar for Villanmac

I know you cant do my work for me but could someone give me some guidance as to how I should approach this to get me going. Im going to need the For loop but Im not sure how? Question- Write a function that displays at the left margin of …

Member Avatar for Lerner
0
125
Member Avatar for mikeandike22

Hi im trying to take a .dat file with just a list of integers separated by lines. The program has to allow for whether or not the list is an even amount of numbers or not. im a bit stuck here is what i have so far. [CODE]#include <iostream> #include …

Member Avatar for mikeandike22
0
672
Member Avatar for zizimetalique

can you help me writing a code for this please i am confused St. Habakkuk of the Abacus is the patron saint of software engineers. He was a public scribe and money-changer (an honest one) in the late Roman Empire, when all computation was performed on a kind of abacus …

Member Avatar for ithelp
0
109
Member Avatar for dssn

I have to write a program that calculates a students final grade. The program should allow the user to input a students name, their exam grades, and their lab grades. using fstream The program should determine averages, calculate the final grade and display the output. For each student generate the …

Member Avatar for ithelp
0
71
Member Avatar for harunsari82

Hello everybody.. i have a project to do. its about lexical analysis there will be a regular expression like [(a|c)*b] . and this regular expression (RE) will be converted to nondeterministic finite automata(NFA) using Thompson's Construction and then the NFA will be converted to deterministic finite automata (DFA) using Subset …

Member Avatar for ithelp
0
60
Member Avatar for kaly12

can any1 help me with my cwk.. Mr Joe Brachialis, the proprietor of Joe's Gym wants to modernise his filing system. He currently keeps a card index system but he would like to have a computer application to maintain the records of his clients. The clients are offered two types …

Member Avatar for ithelp
0
93
Member Avatar for dhiraj_shokeen

hey Nanu can you pls send me that bank balance cpp. I really need it for my 12th class project.ppppppppllllllllllllllllllllllllsssssssssssssssss........................

Member Avatar for Salem
-3
87
Member Avatar for ice_tea_lemon

Hey all, I was wondering if any of you could help me out a little but with my functions which I'm writing for a program. I recently have noticed that I'm simply assuming the person using my program would be someone who also uses Bloodshed C++, so I think I've …

Member Avatar for Salem
0
161
Member Avatar for ricnyx

fin1 xx.txt -------------------- Paychecks 2500.00 Interest 100.00 fin2 xx.txt -------------------- Car_Insurance 250.00 Cell_Phone 50.00 Book 200.00 Student_Loans 180.00 Rent 950.00 fin3 xx.txt -------------------- Food 350.00 the output become --------------------- [CODE] Paychecks 2500.00 Car_Insurance 250.00 Food 350.00 Interest 100.00 Cell_Phone 50.00 Cell_Phone 50.00 Book 200.00 Student_Loans 180.00 Rent 950.00 [/CODE] ------------------------------ …

Member Avatar for ricnyx
0
132
Member Avatar for SNN

Hi, I have a text file that contains data seperated by a tab. I know that there are 26 columns but the number of rows are unknown b/c the file is huge. I need to traspose the data so I wrote the following script. I open the data file 26 …

Member Avatar for Ancient Dragon
0
121
Member Avatar for HariHarry

Hi people, I am sort of very new to Visual C++. I got some query to ask you guys!! I am actually creating a satellite DLL for an application which has not been localized. The situation is: I need to create a new DLL with all the dialogs and string …

0
53
Member Avatar for cameron.kay

I have been given the following question in one of my classes, and i know it is probably extremely simple, i am just very thick. Can some one explain to me the steps to work out this problem. "Starting with the following initial values, specify the value of each variable …

Member Avatar for WaltP
0
102
Member Avatar for Jacky1

Hi guys I'm trying to generate a radnom float number between 1.2 and 2.3 but when compile I get this error: cal.cpp: In function `int main()': cal.cpp:13: error: invalid operands of types `int' and `double' to binary `operator%' the code: [CODE] int main() { srand(time(NULL)); float num; num = rand() …

Member Avatar for Jacky1
0
181
Member Avatar for deraj8

i am very new to c++ and have to create a program that will manage the sales of 40 different stores. I was told to use 2 (parralel) arrays(not a two dimensional array). I have no idea how to add the proper data i need becuase the file i am …

Member Avatar for vmanes
0
112
Member Avatar for ssjad05

When it prints it does not print the numbers and names in ascending order like its suppose to do and i have no clue why it doesnt. This is for school and this is the book we are using in class: sixth edition-starting out with C++ early objects. We are …

Member Avatar for WaltP
0
426
Member Avatar for phvan

15.5 Ten Carat 12:30 Sedg Yorkshire Evening Post Phil Rostron -12.64 5.5 Chip N Pin 1:35 Sedg News of the World Pegasus +2.10 5.5 Chip N Pin 1:35 Sedg Newcastle Journal Doug Moscrop -6.00 4 Serabad 1:35 Sedg Irish Post David Thorpe +0.50 3.85 Malt De Vergy 2:10 Sedg The …

Member Avatar for WaltP
0
126
Member Avatar for driplet

Can any body tell me how to convert the following Fortran arrays to C++? CHARACTER ST1*10 CHARACTER ST*(*) Thank you in advance!

Member Avatar for WaltP
0
190
Member Avatar for zandiago

Good day. I would like some suggestions/recommendations as to what type of project i could do...so basically you guys get to assume the role of a professor...here it goes: Write a program that uses an array of structures. lt can be on any topic or subject you wish to choose. …

Member Avatar for zandiago
0
561
Member Avatar for BlackNinja

Hi, I am having trouble with skipping lines in a file and inputting the value it reads into variable inside the program. Data Inside the txt file i am trying to read: 00112 yourname 5874.87 176.07 3456.98 what i want to do is take the last 3 numbers and input …

Member Avatar for BlackNinja
0
136
Member Avatar for lifei

hi..currently i am doing my final year project regarding pure tone audiometer. i had found the tone with different frequencies and amplitudes.. however, i dont know how to load in my program. Can anyone help me by teaching me how to load and play those tones by using visual c++ …

Member Avatar for vmanes
0
112
Member Avatar for nicz888

[code=c++] #include <cstdlib> #include <ctime> #include <iomanip> #include <iostream> using namespace std; // prototype and name space declaration int sqr(int); int cube(int); int fourthPower(int); int fifthPower(int); int sixthPower(int); bool printNum(); void show(int (*fn)(int), int); //------------------------------------------------------------------ //------------------------------------------------------------------ //------------------------------------------------------------------ void main() { char first[30], last[30]; cout << "Please Enter Your First Name: …

Member Avatar for Lerner
0
183
Member Avatar for cgraves

Hello All, I need some major help. I have to make a game for my final project. I decided to do Rock, paper, scissors. I need to add 2 arrays, repetition, user defined functions, and an option to quit. Like "type 3 to quit" Please help. Here is my code: …

Member Avatar for WaltP
0
112
Member Avatar for HLA91

Hi all My friend sent me a source file that wrote hello world to a text file (im a noob), I tried to modify it and give myself a challange to make a small database but it has gone horribly wrong. I dont know how to get it so when …

Member Avatar for Ancient Dragon
0
115
Member Avatar for mannantes

Hi, plz can u help me i want to sort my file (sort the second column) and i don't find any solution do u have some idea for me plz!! my file : [CODE] 1176890540542339 1 102 2005 4 1176890540575285 0 103 2005 4 1176890540575285 1 103 2005 4 1176890540608694 …

Member Avatar for mannantes
0
82
Member Avatar for mjmythili
Member Avatar for dallaseve

Can anybody help me with getting managed code to talk to unmanaged code? I'm okay coding via clr, but I don't have a clue what I'm doing when I try using the GUI interface. I'm using MS Visual C++ 2005 and I'm totally lost VB is much easier. I could …

Member Avatar for dallaseve
0
129
Member Avatar for johny112

i have written this program. it excecutes without any errors and even gives me the correct answer. the program is to tell whether the integer is odd or even. the problem is that i want a series of integers and passes them one at a time to function even. Sample …

Member Avatar for johny112
0
223
Member Avatar for picklesandmayo

So I started on the final section of my C++ project and got almost done until I re-read the requirements and saw this: [B]Do not use arrays.[/B] *crap* Is there any other way to store multiple inputs than arrays? Basically the idea is to use a recursive function get a …

Member Avatar for Salem
0
191
Member Avatar for dsuh06

what does the following do? int array[6] = { 5, 3, 4, 17, 22, 19 }; int* ptr = array[0] *ptr = -1; thank you!

Member Avatar for Ancient Dragon
0
116
Member Avatar for ricnyx

[code]#include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main( ) { ifstream fin; ofstream fout; fin.open("income.dat"); fout.open("total.dat"); char income; fin.get(income); while (! fin.eof()) { cout << income ; fin1.get (income) ; } double next, sum = 0; int count = 0; while (fin >> next ) { sum …

Member Avatar for Lerner
-1
108
Member Avatar for brlukosk

Hi there, I am currently working on a program that reads an inventory list from a file, sorts the list, and then determines the value of the inventory based on the price and the quantity on hand. After these calculations I need the program to write the output to a …

Member Avatar for Lerner
0
1K
Member Avatar for d0ugg

Hi all, I have a little question, my compiler is giving me the following error: error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'std::istream' see declaration of 'std::operator <<' Here is the main part of my project. [CODE] #include <iostream> …

Member Avatar for Ancient Dragon
0
126
Member Avatar for superbob

hey guys, i have a problem with this program... [CODE] void findMax(int arr[], int n, int* pToMax) { if (n <= 0) return; // no items, no maximum! int max = arr[0]; pToMax = &arr[0]; for (int i = 1; i < n; i++) { if (arr[i] > max) { …

Member Avatar for Ancient Dragon
0
83
Member Avatar for DREAMER546

hey .. please i need help with this code when i write it and i start in case 3 .. i've error massage .. illegal case .. why is that ? [CODE][LIST=1] [*]#include <iostream> [*]#include <string> [*]using namespace std ; [*]class employee [*]{ [*]private: [*] string name; [*] int salary; …

Member Avatar for DREAMER546
0
82
Member Avatar for johnnyjohn20

Hi, I have an array with elements filled with values such as 36.0119. I am trying to find a way of rounding each value to the nearest whole number E.G. 36. To show i have attempted this i have used cout with the array and set precision which is ok …

Member Avatar for WaltP
0
970
Member Avatar for tootypegs

Hi, i would like to be able to create an icon that appears in the tray by the clock in the bottom left of the desktop. I've looked around and found a little help on msdn but im struggling to understand everything on it, i have the following code (from …

Member Avatar for Ancient Dragon
0
98
Member Avatar for johny112

Im getting 2 of these warning message upon compiling the programme below. Cant figure out why. can someone help please? warning C4700: local variable 'rate_of_pay' used without having been initialized warning C4700: local variable 'hours' used without having been initialized Question Develop a C++ program that uses a while structure …

Member Avatar for Ancient Dragon
0
87
Member Avatar for tones1986

Hey folks. I am working on a program (really its 2, but they go hand in hand). The first one takes a text file which contains the following: last name first name SSN Salary Years employed There are 7 entries in the text file to be read in... The program …

Member Avatar for vmanes
0
161
Member Avatar for guitarrick

How many bools can I connect?? e.g. if((x>j) || (y<t) || (m=c) && (x != 0)) Please pardon any improper syntax, and any guidance is greatly appreciated (My text doesn't go into great detail with bools, but we're working with classes right now, and in one example there are three …

Member Avatar for guitarrick
0
359

The End.