49,757 Topics

Member Avatar for
Member Avatar for ade161

i need your help in creating a program that allows the user to enter a payroll code. The Program should search for the payroll code in the code in the file and then display the appropriate salary. If the code is not in the file, the program should display an …

Member Avatar for daviddoria
-1
156
Member Avatar for clayton69692000

hi guys i really need some help. Im trying to turn my index array into a multidimensional array and cant get it to compile. thanx for the help. [CODE]include <iostream> using namespace std; #include <cstdlib> #include <cstring> #include <iomanip> const int LIMIT = 10; const int MAX = 10; class …

Member Avatar for jonsca
0
91
Member Avatar for Nathaniel10

I have a difficulty I need help to overcome. I am developing a program that uses more than 1 class. Variables defined in one class are used in other classes. For example: [code] class X1 { private: int a; int b; public; X1() { a = 10; b = 20; …

Member Avatar for Nathaniel10
0
151
Member Avatar for triumphost

This is a program that is supposed to run on startup when the computer turns on... What I did was I put the name of the program in the RunOnce Registry key attached below... when u double click the key, it puts the program name in the registry telling it …

Member Avatar for triumphost
0
152
Member Avatar for modesto916

Hi everybody, here i am again ¬¬, I am doing an exercise that ask me to write a program to calculate this constant: e = 1 + 1/1! + 1/2! + 1/3! ... The user need to input how much the program must calculate. I wrote this code, but i …

Member Avatar for modesto916
0
172
Member Avatar for mariuam

this coding is in the class of set! Set::setDifference(int elements,int& z) { int a,b; z=(elements*a,elements*b); int temp; for (int i=0; i<=elements; i++) { *temp[i]=set[i]- z.set[i]; } return temp; }

Member Avatar for hag++
-3
104
Member Avatar for NathanMc

Hello. I'm running into a problem on an assignment I have for my C++ class. I've done similar things before with reading a file, but normally used a counter to know when to stop reading from a line and go on to the next, or code like this: [code] ifstream …

Member Avatar for hag++
0
163
Member Avatar for burcin erek

test program, dont understand after calling function it goes two times destructor "-5" is it wrong ? [CODE]#include <cstdlib> #include <iostream> using namespace std; class calculation { public: calculation(); // constructor ~calculation(); // destructor. }; calculation::calculation() { cout << "5"<<endl; } calculation::~calculation() { cout <<"-5"<<endl; } calculation function_one(calculation addition); int …

Member Avatar for burcin erek
0
99
Member Avatar for dophine

Hi all, I don't quite understand the program print the following output. [CODE] class D { public: D(int j):i(j){printf("default %d\n", i);}; D(const D& d):i(d.i){printf("copy %d\n", i);}; private: int i; }; int main(int argc, char** argv) { D d = 2; D d1 = D(23); } [/CODE] output: default 2 default …

Member Avatar for mike_2000_17
0
106
Member Avatar for Nandomo

I need an explanation on how to use 2 dimensional arrays displaying names. And single dimensional arrays for displaying letter and number grades. I need to make a self input gradebook for my students and do not know how to function it. I want them to input their names and …

Member Avatar for Nandomo
0
177
Member Avatar for ohsevenfiveoh

hey guys,been browsing this site for a few weeks,but this is my first post. As you might guess by my problem I'm a C++ noob. I'm tryin to make a program in which the user inputs an array of double, I then use bubble sort to to get it into …

Member Avatar for Fbody
0
603
Member Avatar for aaronmk2

Can someone explain and give an example of how double hashing works. I understand linear, quadratic, and chain.

Member Avatar for vanalex
0
65
Member Avatar for coolkid1093

I am doing a c++ project on cows and bulls where the computer has to guess the number. I have a few questions.? I recently heard of the pigeon hole principle( i am not exactly sure about how to use it)and I am trying to use this to do my …

Member Avatar for geethasree
0
119
Member Avatar for lochnessmonster

say i have a class which the user can make an object of by passing in 2 parameters. If the parameters entered are wrong how should i handle this? 1.) should i try to create the object,and then do the checking in the constructor? if the arguments are invalid then …

Member Avatar for geethasree
0
115
Member Avatar for KellieD

Hi, Would be very grateful if someone could tell me how to start an array by getting the program to ask you how many values you want to enter (the maximum being 50) Thanks :)

Member Avatar for KellieD
0
82
Member Avatar for hystaspes

What is the use of declarators in struct's definition? and what is a "tag declarator"? example from MSDN: [CODE] [template-spec] struct [ms-decl-spec] [tag [: base-list ]] { member-list } [declarators]; [struct] tag declarators; [/CODE]

Member Avatar for hystaspes
0
280
Member Avatar for claudiordgz

I guys, i have a problem with binary files A file is opened in the beginning of the main then a case to give the user a choice: 1.- Show the content of the file 2.- Search for a name 3.- Search for a type of crime 4.- Search for …

Member Avatar for claudiordgz
0
104
Member Avatar for xfreebornx

[CODE]#include <iostream> using namespace std; struct student { int ID; char name[80]; char nationality[80]; char gender[2]; }; void insert(student array[]); void Sort(student array[]); int main() { student array[100]; int answer; cout <<"Welcome to student recording system"<<endl; cout <<"Please choose one of the following option"<<endl; cout <<"1.Insert new record"<<endl; cout <<"2.Delete …

Member Avatar for A.Ali
0
282
Member Avatar for vedel

Hey Guys! I am vedel and this is my first Thread in this Community. My question is, how i can boot a c++ code? example code: [CODE] #include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; } [/CODE]

Member Avatar for vedel
0
1K
Member Avatar for vbx_wx

[code] #include <iostream> #include <cstring> using namespace std; int main(int argc, char* argv[]) { const char* p = "1111"; int len = strlen(p) - 1; int a[len]; for(int i = 0; i <= len; i++) { a[i] = ~(p[i]- '0'); } for(int i = 0; i <= len; i++) { …

Member Avatar for gerard4143
0
94
Member Avatar for sadsdw

Hi everyone, I'm recently in C++ and I would like to develop one C++ code that read a file ".txt" of strings and numbers with different size of columns and lines. After I need to get the frequencies of each element of the same column. Cheers, SADSDW Example: ABC DEF …

Member Avatar for Fbody
0
116
Member Avatar for rebellion346

Im having issues trying to get this to work. I think the problem for my Meet and Join functions is its printing out the C array inititalized to all 0's and not the modified C array after all the calculations have been done. Also, I don't think my for loop …

Member Avatar for mitrmkar
0
2K
Member Avatar for Tsunami49

Hi there. I am currently trying to get my head around using classes across two files. I currently have a super class and a sub class stored in a file and the main function in another. When I try and pass arguments to the class they work fine if the …

Member Avatar for Tsunami49
0
135
Member Avatar for sarfu

Hello every coder. i want to know if it is possible to send data (text/char) over internet using c++ . can i use winsock send function as i could see on msdn winsock send is used to send data to the server, hence i started coding using winsock, i was …

Member Avatar for Duongpv
0
771
Member Avatar for nerdygirl118

Hello. I am making a wheel of fortune game and am getting stuck. This loop keeps repeating the first line "Incorrect input. You can only pick a vowel." Also, I can't get the phrase to read the vowel and say, "Sorry, this vowel was already revealed." If the vowel was …

Member Avatar for WaltP
0
233
Member Avatar for globberbob

Trying to write to a file with this function in my program, for some reason itl make the file, it'l output the text on screen, it all works as intended, but i go to check on the file, and its blank inside. so im guessing im doin somethin dumb, help/tips …

Member Avatar for globberbob
0
133
Member Avatar for whodoes21

Hello members of Daniweb :) I am a frosh IT student and I need little help with this :) ok so the program is basically a simple cashier program. you enter a code for an item. you buy it compute for the change etc. etc. now my problem is with …

Member Avatar for whodoes21
0
199
Member Avatar for ConfusedStudent

I have a file with a list of names. Jane Huston Bob Brown Jack Tracy they should be ordered by last line like this Bob Brown Jane Huston Jack Tracy but my program wont compile and i dont know how to fix it? here is my code #include <iostream> #include …

Member Avatar for VernonDozier
0
302
Member Avatar for rebellion346

I'm getting weird output from this program, its printing a bunch of huge negative numbers, they're all the same number in fact. I have no idea what's wrong with it. Heres what im trying to do: I'm taking ordered pairs and translating it into a boolean matrix so for example …

Member Avatar for rebellion346
0
153
Member Avatar for hq1

Ive been working on this code for a bit but cant figure out what im doing wrong, If someone could have a look Id appreciate it a lot. Thanks! heres what its suppose to do: Write a function that displays the left margin of the screen a solid square of …

Member Avatar for Taywin
0
122

The End.