49,757 Topics
| |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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; } | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Can someone explain and give an example of how double hashing works. I understand linear, quadratic, and chain. | |
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 … | |
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 … | |
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 :) | |
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] | |
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 … | |
[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 … | |
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] | |
[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++) { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.