49,761 Topics
| |
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. | |
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 … | |
#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 … | |
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 ? | |
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. … | |
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 … | |
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. | |
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 … | |
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 … | |
//*************************************************************** // 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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
Average:96.1429Your Total Marks are673and Marks Per Subject is96.1429 | |
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 … | |
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 … | |
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 *[], … | |
What are some concepts of data structure and algorithm? | |
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 … | |
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] … | |
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 … | |
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(); … | |
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 … | |
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 … | |
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 | |
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 … | |
| 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 … |
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 + … |
The End.