49,761 Topics

Member Avatar for
Member Avatar for Wabu_1

Create a C++ program that uses Structures/Unions/Enum/Typedef to collect employee records/data (ID, Name, Date of Birth, qualification...), calculate Age using a function for 5 employee and display the full record for each employee.

Member Avatar for Reverend Jim
-1
59
Member Avatar for can-mohan

Hi, I need to make sure my integer variable doesn't store more than 2 bytes. Usually i am writing programme on Linux machine where integer size is 4 byte. Each byte can take the values 0 through 255 (=2^8-1). So, two bytes can take the values 255*255=65535, so would it …

Member Avatar for AssertNull
0
458
Member Avatar for surfingturtle

#include <iostream> #include <cstdlib> #include <new> using namespace std; void memwarning(); void* operator new(size_t, int); void operator delete(void*); int main() { char*p = new('$')char[100]; //Query 4b cout<<endl<<"First allocation: p = " <<hex<<long(p)<<endl; // Query 1 for(int i=0;i<100;i++) cout<<p[i]; cout<<endl; delete p;// Query 2 p=new('*')char[64000u]; // Query 3 delete p; return …

Member Avatar for surfingturtle
0
243
Member Avatar for Azim_1

Hye I'm new to c++ language. Can anyone suggest me what is the best programming software should I learn ? And how I'm gonna learn coding ?

Member Avatar for rubberman
0
291
Member Avatar for Mr.M

Hi Guys. First of all is it possible to detect a file copying/moving within the system, I'm sure this is done in lower languages like C++ but I've tried searching but I don't seem to find not even en example, maybe it because I don't know how it correctly called. …

Member Avatar for pritaeas
0
1K
Member Avatar for Ed Genes

I have a program that runs a bank management.It saves the created accounts in account.dat. For example these are the contents of the data file: 1001 felisilda s 5000 0002 smith s 3000 1212 johnson c 3200 I want the output to be sorted increasingly based on the bank account …

Member Avatar for AssertNull
0
366
Member Avatar for Chisanga_1

Where do I start creating a face recognition program? I am a beginner in the programing world who only knows little about c++. What do need to consider or what I have in place. I am running of windows pc and using devc++ and Mingw compilers.

Member Avatar for Traevel
0
294
Member Avatar for Mr.M

Hi Dw. If there is anyone who knows how and which languagies are used to develop software's like word processing, Excel, Access, basically things like Office suite. I know Linux has their own different tools for office, as well as Microsoft as well and other OS have different Suites for …

Member Avatar for rubberman
0
193
Member Avatar for Steven_14

It's been a few years since I last dabbled in C++ and then it was only learning the console stuff but by no means was I a master of it. I'm comfortable with VBA, MS Access and SQL. I'm wanting to delve into the GUI world of C++ with a …

Member Avatar for Steven_14
0
354
Member Avatar for Ed Genes

//*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include<iostream> #include<fstream> #include<cctype> #include<iomanip> using namespace std; //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** class account { int acno; char name[50]; int deposit; char type; public: void create_account(); //function to get data from user void show_account() const; //function to show data on …

Member Avatar for rproffitt
-1
162
Member Avatar for ice_3

Code: do{ cout<<"No. of random numbers (-10-10): "<<endl; cin>>howmany; if(howmany<1 || howmany >50) cout<<"INVALID INPUT"<<endl; }while (howmany<1 || howmany>50); cout<<endl<<endl <<"The "<<howmany<<" random numbers from 1-50 are :"<<endl; srand(time(0)); for (ctr=0,negativectr=0,positivectr=0; ctr<howmany; ctr++) { randnum[ctr]= rand() % 50-1; cout<<randnum[ctr]<<"\t"; if (randnum[ctr] % 2 ==0) { positive[positivectr]=randnum [ctr]; positivectr++; } else …

Member Avatar for AssertNull
0
318
Member Avatar for Chris_38

Can someone give me some programming ideas to keep my knowledge up-to-date? I received a masters degree in computer science back in December and been job searching since then. I want to tell an employer something.

Member Avatar for rproffitt
0
287
Member Avatar for Wilda_1

I am writing a code which prompt user to enter her mobile number and in result..I code to display it's user SIM network according to some principles which I code but I don't understand whats wrong with my code.. It saves data in a text file... // here is my …

Member Avatar for rproffitt
0
304
Member Avatar for Lp_baez

when the console displays the "StudentAns" I get weird characters instead of the actual answer. ///////////////////////////////////////////////////////////// this is the files CorrectAnswers.txt A D B C A A D B D C A D B A C C D B C A StudentAnswers.txt A D B C A A D B …

Member Avatar for AssertNull
0
349
Member Avatar for Kersten

Hello, this question is related to an older post of mine ([Click Here](https://www.daniweb.com/programming/software-development/threads/505499/getopenfilename-freezes-at-second-execution)). In this question i stated that my program freezes at the execution of GetOpenFileName. After struggeling a while with that problem and doing other more important stuff first, i came back to the original problem and found …

0
218
Member Avatar for Esmatullah
Member Avatar for rubberman
0
324
Member Avatar for Daniel_59

I currently have a problem where the program when it is running will also choose one word and one letter in the word file. For example, in the word file the program only chooses the 2nd word "Dependent" The only letter that is considered correct is "d" My code is …

Member Avatar for AssertNull
0
373
Member Avatar for Tom_15

Hi: I wasn't able to find the exact solution to my problem on Daniweb, although there are several posts regarding the game of life. This situation came the closest: http://www.daniweb.com/software-development/cpp/threads/242338 My situation is a bit different because I HAVE to use a combination of functions and a class in the …

Member Avatar for Reverend Jim
0
2K
Member Avatar for Sid_3

whenever I enter 0 in the string value to quit the loop it does not work PLEASE HELP ME!! #include<iostream> #include<string> #include<fstream> #include<cctype> #include<stdlib.h> using namespace std; struct Student { string netID; string firstName; string lastName; int maxCourses; int numCoursesEnrolled; }; const int SIZE = 100; int readStudentData(string, Student *[], …

Member Avatar for rubberman
0
305
Member Avatar for Benny Adams
Member Avatar for Wilda_1

For over the few months I've being trying to display LIST the of IPV4 Adresses in C++ programming , but unfotunately when I am going to compile the code it done properly but it shows nothing to me and error message generate please fix this problem you genius guy's... #include …

Member Avatar for Wilda_1
0
465
Member Avatar for tonykjose

I have got a small problem with this program. It takes a user's input of numbers and sorts them by merge sort in increasing order using linked lists. Unfortunately, a segmentation fault appears immediately after I input the numbers. Probably something to do with the merge sort function. Help! [code] …

Member Avatar for rcgldr
0
361
Member Avatar for Tom_15

I need help getting my neighborcount function to work correctly, as follows neighborCount:Given two arguments that indicate the row and column of a particular cell in the matrix, this function returns the number of neighbors that have the value "true". Most positions in the grid have 8 neighbors like the …

Member Avatar for Tom_15
0
550
Member Avatar for Suzie999

Here is example class, the commented code in constructor works as well as the initializer. My question is, what is the correct way? class NClass { public: int _pid; std::wstring _name; NClass(int pid, wchar_t * name) : _name(name) { //_name = name; } void Print() { std::wcout << _name; std::getchar(); …

Member Avatar for Suzie999
0
3K
Member Avatar for Tom_15

I need help inserting the assert function within my code, and creating the neighborcount function as listed below, heres the guidelines: default constructor: initialize all of the array elements to false get: return the current contents of a single array element. Use arguments to indicate the row and column of …

Member Avatar for Tom_15
0
691
Member Avatar for One-up

I have a tough time trying to break what's in here: #include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; int main () { float grade; string name; cout << " Please input your name: " << endl; getline(cin,name); cout << " Please input your grade: " << endl; cin …

Member Avatar for rubberman
0
232
Member Avatar for Shuaibu_1

Am a master of engineering student i need to use LTE-SIM soft ware for my dessertstion ,please how can i go about it,thanks

Member Avatar for rproffitt
-2
210
Member Avatar for Mr.M

Hi, I get "first-chance exception at 0x1000161f in myapp.exe: 0c0000005: Access violation reading location 0x00000000." If i execute the WFSOpen command. To be able to receive the error pointing to the correct error value I've done this: LPHSERVICE lphService; lphService = 0; // I put 0 because the EXIT_SUCCESS is …

Member Avatar for Mr.M
0
2K
Member Avatar for Arshad Syabrin

Given a positive decimal number, we can convert the equivalent numbers in binary; in octal and in hexadecimal. Due to the hexadecimal numbers, it is better to use character arrays to store the various conversions. We propose the following structure to store the information of a number: Working on a …

Member Avatar for rubberman
1
212
Member Avatar for will_9

hi guys thanks for viewing and helping me out!! here are the example what the things will looks like Enter problems per set: 3 Set #1 ---------- What is the maximum number for this set? 100 45 + 21 = 66 correct 0 + 100 = 100 correct 54 + …

Member Avatar for rubberman
0
356

The End.