51,593 Topics

Member Avatar for
Member Avatar for noxee

Hi I'm trying to have an assignment operator for my linked list class so that when I call it, it replaces the current one with the one I pass in. i.e testList1 = testList2; I'm trying to get it so that testList1 will point to testList2. Here is the code …

Member Avatar for noxee
0
78
Member Avatar for FireSBurnsmuP

I had to use an enumerated data type in my last program, and I couldn't get my program to stop giving me fatal run-time errors. here is the enumerated data type: [code]enum piece {EMPTY, BLACK, WHITE};[/code] Now, the trouble I am having is related to evaluation or assignment of this …

Member Avatar for FireSBurnsmuP
0
160
Member Avatar for punter

Hey. The intent of this program is to help answer the question “How good is the random number generator rand()?”. The program must be designed and written in a modular fashion using functions and arrays The function rand() returns int values between 0 and some system-specified maximum value. The first …

Member Avatar for Ancient Dragon
0
224
Member Avatar for linq

I am using the MFC dialog application. There are 3 edit box, add1, add2 and sum and a button "add", when exectuing, I input add1, add2, and use the "add" function dlg.m_sum=dlg.m_add1+dlg.m_add2 how to make the sum appears in the "sum" edit box? Do I have to add a view …

Member Avatar for Ancient Dragon
0
110
Member Avatar for CurtisBridges

Nuts I'll be soon. I still cant get this to run.It keeps telling me cannot convert from const and I cant find where I declared a constant. Help Please! [CODE] #include <iostream> #include <iomanip> #include <conio.h> using namespace std; void call(void (*)); void Menu(char [11][25]); void Add(char [11][25]); void Update(char …

Member Avatar for Ancient Dragon
0
82
Member Avatar for JRM

Helo again. I was experimenting with the use of ctags in Vim. Before I started, I made sure to download the lastest and greatest version of "exuberent ctags. While the Vim manual says to run ctags *.c, i took the liberty to run ctags *.cpp instead (just in case...). The …

0
55
Member Avatar for batista06

Greetings...I'm trying to add a part for 2 times the rate for any hours over the first 60...Can anyone aid me? Many thanks [code] // This program calculates gross pay. #include <iostream> #include <iomanip> // Global constants const double PAY_RATE = 10; // Hourly pay rate const double BASE_HOURS = …

Member Avatar for Ancient Dragon
0
126
Member Avatar for coool_rahul

have prepared a code in c++ to save high scores and it is working well when i compile it in turbo c++and run the code . but when i exit from the turbo c++ , the file to which i saved the high scores get corrupted and so when i …

Member Avatar for Salem
0
759
Member Avatar for jimbobint

I'm really having trouble understanding how to initialize multidimensional arrays. The way it is explained in the book I'm reading is: You assign the list of values to array elements in order, with the last array subscript changing and each of the former ones holding steady. Therefore, if u have …

Member Avatar for ~s.o.s~
0
161
Member Avatar for noxee

I'm having a problem inserting data into my binary search tree, it will insert some of it but not all. this is the header file for my BST class: [code=c++] #ifndef BST_H #define BST_H //----------------------------------------------------------------------------------------- #include <string> #include "LinkedList.h" //----------------------------------------------------------------------------------------- using namespace std; //----------------------------------------------------------------------------------------- class BST { public: //Default constructor, …

Member Avatar for noxee
0
128
Member Avatar for jcflore3

Five sets of 3 double numbers stored in a 5x3 array in C++, How do i do this, I have this so far [COLOR=#0000ff]include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<iostream> [/COLOR][COLOR=#0000ff]# include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<iomanip> [/COLOR][COLOR=#0000ff]# include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<cstring> [/COLOR][COLOR=#0000ff]# include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<cstdlib> [/COLOR][COLOR=#0000ff]using[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff]int[/COLOR][COLOR=#000000] main ()[/COLOR] { [COLOR=#0000ff]const[/COLOR] [COLOR=#0000ff]int[/COLOR] NUMROWS = 5; [COLOR=#0000ff]const[/COLOR] [COLOR=#0000ff]int[/COLOR] NUMCOLS = …

Member Avatar for may4life
0
302
Member Avatar for The Leprechaun

ok well i started out with making my own source code then compiling and running with Dev-C++ and when i run it, its working fine until the last line, here let me past my code [code]// just a test #include <iostream> #include <string> using namespace std; int main () { …

Member Avatar for may4life
0
88
Member Avatar for Jonezy

Ok I'm back with another problem im having.. I have a vector of casual staffmembers.. Each time i create a casual staffmember they are added into a vector named thecasuals.. To return a casual staffmembers staffID a function is created: [code=c] staffmember::get_staffid(); [/code] I need to be able to enter …

Member Avatar for Jonezy
0
103
Member Avatar for Schmitty27

Hello, I've been working on this problem for a while, its a program that needs to convert military time to civilian time from an input file using a user-defined function. Then the program must find the maximum temperature and list the temperature and the time at which it occurs. My …

Member Avatar for Schmitty27
0
146
Member Avatar for JS1988

I really appreciated your replys, it helps me a lot when i can see how it is done they way you did it.It really helped me with my other ones I was working out. Do you know how to write a program to print out the calendar for a whole …

Member Avatar for John A
0
128
Member Avatar for Nekokoneko

Hello, I am currently in a programming Logic and design course at my local community college and I was give 5 chapters to read because I join the class late. I am now in 3 and I am confuse with a method that the book does not explain too much. …

Member Avatar for John A
0
102
Member Avatar for mattyd

I am planning to implement [I]#include <time.h>[/I] in my program. I have never yet used this include. I will be using this in order to track a 24-hour period, or at least that is what I wish to do; I basically need to set up a natural 24-hour day that …

Member Avatar for WolfPack
0
115
Member Avatar for pengwn

I am unable to get the "is" I keep getting the below: [B] the find : this the find : this [/B] what I want is: [B] the find : this the find : is [/B] from the below code: [code] typedef multimap<int,string> IntStringMMap; IntStringMMap coll; // container for int/string …

Member Avatar for iamthwee
0
671
Member Avatar for term

Ok this program takes rainfall data for every month of the year and displays the total and avg for each month. I need it to display each month in order of rainfall from highest to lowest as well. Im having a hard time implementing showorder into my code. Can someone …

Member Avatar for ~s.o.s~
0
89
Member Avatar for jessiegirl

I am new at C++ programming..Anyway I need to create a C++ Program that involves one large chemical company that pays its salepeople on a commission basis. The sale people receive $200 per week plus 9 per cent of their gross sale for that week. For example,a salesperson who sells …

Member Avatar for jessiegirl
0
106
Member Avatar for phuduz

hey guys my program assigns a letter grade to a specfic percentage for an exam score and the problem is taht if i enter a number that is not specified in my if statements it should say invalid number but the program juss prints out the regular output with no …

Member Avatar for may4life
0
82
Member Avatar for mikeallen

I'm trying to write a program that uses overloading of operators to perform operations (add, multiply, etc.). I've got the program done, but I'm having trouble modifying the driver I have to fit the program. The original program used a print method, and the new program uses overloading input and …

Member Avatar for mikeallen
0
146
Member Avatar for spacecowboy123

Hi All, I'm having a bit of trouble with a simulation I am writing in C++. Any help to solve the problem would be appreciated. The simuation needs to run 5500000000 times. When it gets to 2100000000, the counter I am using changes to -210000000. So as you can see, …

Member Avatar for may4life
0
89
Member Avatar for silicon

Hello everyone, I just wanted to thank you in advance for all of your help. My code is now working properly except for one thing. The insertion part feels like it takes about 5 minutes to complete. I know that this method is the slowest of the 4 I was …

Member Avatar for ~s.o.s~
0
273
Member Avatar for mattyd

Hi, I am working on a fairly simple project (it will grow more in time as planned) but I am stuck in a spot which I cannot solve yet. The operation of this prog at this point is: [LIST] [*]Start. Ask user for input choice (only 1 choice available at …

Member Avatar for ~s.o.s~
0
139
Member Avatar for Priya.K

hi How to implement drag and drop of files between windows explorer and my application which is developed using Borland C++ Builder? Thanks, Priya

0
45
Member Avatar for king13

My program seems to be ignoring my cents after the decimal point for total_charge. It adds the dollar amounts, but ignores or does not see the cents. Can anyone give me suggestions as to what I need to look at? I'm brand new at coding, thus the reason for all …

Member Avatar for king13
0
112
Member Avatar for hui

//My function is but the problem is that i dont have a proper working main function void reverse(int a[], int n) { // function: Reverses the elements of a. // parameters: // a inout array of values. // n in number of values in a, a[0]..a[n-1] // returns: nothing for …

Member Avatar for may4life
0
288
Member Avatar for matrimforever

What I am trying to do: [quote][LIST=1] [*]A function to add one to the current count. [*]A function to subtract one from the current count. [*]A function to reset the count to zero. [*]A function that returns the current count.[/LIST]Do not write a constructor for this class. Write a main( …

Member Avatar for may4life
0
254
Member Avatar for mhasan_mitul

Hi I want to create a USB driver for Windows98. I need several windows API to communicate with the USB. That's why I need to know how to load dll files in Microsoft Visual C++ for using windows API and which API will help me to build my driver. Is …

Member Avatar for Ancient Dragon
0
116
Member Avatar for JS1988

Does anyone know how to writea program to print 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 and so on until it is down to one. Anyone know how to right a function that …

Member Avatar for may4life
0
123
Member Avatar for noxee

Hi guys, When I try to compile the code below I get an error saying: error C2065: 'file' : undeclared identifier. But if I run the program it still works. [code=c++] // WordStreamTest.cpp //-------------------------------------------------------------------- #include "WordStream.h" //-------------------------------------------------------------------- using namespace std; //-------------------------------------------------------------------- void OutputNumber (const string &str); void OutputLine (int length); …

Member Avatar for Ancient Dragon
0
59
Member Avatar for Zopharr

We were assigned the following problem as a large project in my Freshman intro to C++ programming class: We have to determine the number of terms needed to calculate Pi to a specific number (3.0, 3.1, 3.14, 3.141, 3.1415, and 3.14159), using the formula: pi= 4(1-1/3+1/5-1/7+1/9-1/11+1/13...) I thought I had …

Member Avatar for Zopharr
0
108
Member Avatar for Jonezy

Hey.. Names Jay.. I'm new around here.. Doin C++ and i'm a beginner programmer.. I have been going OK but i am stuck!! For this assessment i have to create a payroll system for a company.. The company must contain staffmembers.. There is a class for staffmembers.. Inheriting frmo this …

Member Avatar for Jonezy
0
4K
Member Avatar for jimbobint

[COLOR=#000000]Hi everyone I’m new to the forumn and programming – well iv’e read one book c++ programming in easy steps by Mike Mcgrath. I have now got a slightly more indepth book Sams teach yourself c++ in 24 hours fourth edition. All has been going well until I got upto …

Member Avatar for jimbobint
0
322
Member Avatar for JRM

Hello all, While I understand what the class access keywords public, private, and protected are supposed to do, I just don't see how this ACTUALLY "hides variables" and makes for more bullet proof code. Do the variable names survive the compilation process? If someone was to read compiled code in …

Member Avatar for Ancient Dragon
0
124
Member Avatar for Colin Mac
Member Avatar for king13

Hello, I'm having issues with my final total for charges. When I run my program, it either comes up with "0" or if I don't declare my variable, it comes up with a long string of numbers. My total hours works great, but not my charges. Can someone take a …

Member Avatar for king13
0
995
Member Avatar for dummies2

i have this program but it doenst work could you help me plz. you just enter in sentence like: I like the cat. or The cat sees the rat. The cat likes me. then it will say the string is correct. but if you enter in I sees the cat. …

Member Avatar for ~s.o.s~
0
98
Member Avatar for Niklas

Alright well this is supposed to be a basic Geometry calculator that uses set formulas to identify the "chosen" property of the figure by just pluggin in #'s that are used in that formula. I have to admit I'm not expirienced at all in C++ and probably made a ton …

Member Avatar for FireSBurnsmuP
0
239
Member Avatar for Haktivex

Hello folks :) Allow me to introduce myself. I am Haktivex, a programmer for a tool known as TibiCAM, used to record movies for an online game known as Tibia. Now heres the issue. For a long time we supported all operating systems, Windows 98, ME, etc. However recently these …

Member Avatar for Haktivex
1
192
Member Avatar for Sarguna

hi Everybody I want to know how in borland c++ to use the lib file i have a .lib file present with the source code of that library i want to use the lib file I have just added the lib into the project through Project->AddtoProject i did not get …

Member Avatar for John A
0
99
Member Avatar for dmegee

Hi I am trying to find out what I am doing wrong with this code...I need it to load a file and encrypt it, print it, encrypt it again(decrypt it), print it then save it to another file. the original and the new file should be the same...Here is what …

Member Avatar for John A
0
93
Member Avatar for alias47

Hello everyone :) I have a problem with Kraskal's algorithm. :sad: How it is possible to choose the node I want to start with to build minimmum spanning tree? Thank you for ansvering :) [code=c] //implemented using sets concept #include<iostream.h> class kruskal { private: int n; int graph[10][10]; int tree[10][10]; …

Member Avatar for ~s.o.s~
0
117
Member Avatar for DmD

Hi, I'm making a program that is has to send texts from textboxes to a external device wich shows them on leds. But the LED's cant show every character(takes to much time :P), so i'm tasked to make a filter on the textboxes to check if they contain any invalid …

Member Avatar for Ancient Dragon
0
132
Member Avatar for rati

i need to print a wildcard * in the output . a program that takes a string as command line argument prints all the files in the directory instead of *. can u help me?

Member Avatar for rati
0
112
Member Avatar for pugg09

I tried searching the forums but I've come up dry. Can anyone help me with this simple coding excercise. I wanted to template my datatype in my class, but it's coming up with errors. [code=c] //template <typename T> //----> i want to use this class typeClass { private: int myArg; …

Member Avatar for ~s.o.s~
0
106
Member Avatar for ok555

Hi, I need to be able to call a function from all the C++ files included in my project and i am not sure how to do it.. everytime i try something (such as exporting a class or function) i get multiple function declaration errors and it fails to compile, …

Member Avatar for Ancient Dragon
0
733
Member Avatar for hamidr

when i compile a simple program in Dev C++ i get error:" conflicting types for 'myf' " [CODE]#include <stdio.h> #include <stdlib.h> int main() { myf(3.0); return 0; } double myf(double x) { return x; }[/CODE] what does that mean?

Member Avatar for Ancient Dragon
1
75
Member Avatar for Juggler

I have a question about manipulating an array in C++. In my program, a cstring is entered. The string is printed. Finally, the string must be printed in reverse and displayed. The final part is where I am having my problem. I have the strlen function determine the legnth of …

Member Avatar for Juggler
0
227

The End.