48,985 Topics
| |
I know that in case of virtual inheritance, a vptr is needed to access the base class members, so I looked at a program that involved virtual inheritance but I was amazed at the size of the class. The code is below: #include<iostream> using namespace std; class Base { public: … | |
Consider the following class hierarchy of preschool teachers of ABC school, to answer the questions from i to iv. *Preschool teachers full time teachers part time teachers All Preschool teachers have a teacher ID, name, age and Highest qualification. A full time teacher has a fixed monthly salary. He/She has … | |
To all those who use C++ and to the creator of C++ . I want to ask a question . What is the use of the default case in a switch statement ? It is actually to be executed when no case is satisfied , but it is executed even … | |
the program is about Blob<T>, where shared_ptr<std::vector<T> > as its data members. be noted that the real problem here is about shared_ptr of my own version (simple one) but atleast (should) worked with the Blob<T>, which is the std::shared_ptr did, but not with mine. [Error Msg](http://postimg.org/image/krwflmyhx/) the error msg above … | |
Hi, I have run tuner from DirectX filter graphs. My Tv Tuner Card does not provide I/Q samples(Low frequency) as Realtek RTL2832u based USB Tuners so i need to get RF samples directly from TV Tuner Analog Audio out pin and store it in hard disk for digital signal processing … | |
So, I've gotten myself in a bit of a pickle. I have been serializing data I collect with: vector<myClass> mVec; ... // mVec is filled with the data to collect for (auto it = mVec.begin(); it != mVec.end(); ++it) { myfile.write(reinterpret_cast<char*>(&(*it)), sizeof(*it)); } I've wrapped this code in a templated … | |
[program error](http://s11.postimg.org/okbmkhwkj/Untitled.png) this code, which is directly copypaste from the book itself, is appended to Blob.h., producing the above error. template <class> struct std::hash; class Sales_data { friend struct std::hash<Sales_data>; // other members }; // specialization namespace std{ template <> struct hash<Sales_data> { typedef size_t result_type; typedef Sales_data argument_type; size_t … | |
“Magic Video Center” is a video rental company which rent outs Movies and Music videos to its customers. The rental fees for the Videos are calculated as follows. For Movie Video:- Rental fee = (Number of Days * Fee per day) + Extra Charge For Music Video:- Rental … | |
I've never really tried MFC and this excercise is nothing more than trying it out. I found what seemed like a simple spoon fed tutorial to get me started [here](http://courses.washington.edu/css450/2008.Fall/web_contents/from_students/450Hints/mfc_tutorial/tutorial_2.html). Step 6 of the first part in that link says... > Inside 'Tutorial.h', change enum value of IDD to "IDD_ECHOBUTTONEVENT_DIALOG" … | |
> Hello everyone i need c++ program which is made on library management as a sample for my project..thank you for your cooperation ! i am waiting !!!! | |
A file is required to record the daily temperatures of a city for one week from Monday to Sunday. Write a C/C++ program to enter the daily temperatures along with the name of the day, read the file, compute the average temperature for the week and display it. The final … | |
Hi guys this is really important i searched an example code about "Username and Password Validation between Server and Client" through internet a LOT and i couldn't find anything... so please guys if any of you guys have anything about this topic please show me here thanks a lot guys!!! | |
I need to copy modified data that is stored in an char* to another char* but I get an access violation error. Here is the code int EncryptData(char *data_source, char *data_cipher, size_t sizeofdata) { char *tmp_data; long long int digit; tmp_data = new char[sizeofdata]; /* Do some calculations here with … | |
create a program that will: (a) accept the name, basic salary and years of servive of an employee. (b) use an appropriate construct to calculate the bonus due. (c) output the employees's name, years of service, basic salary and bonus in a labelled format. (d) the program must allow for … | |
Good day, I've realized hierarchy of classes: Point -> LineSegment. It's necessary to realize the following methods of the class: moving, stretching, rotating, turning, change on an axis. I'm trying to realize moving at a some distance on this code . What should I correct for in my code that … | |
#include<iostream> #include<fstream> #include <sstream> #include<string> using namespace std; void main() { std::ifstream fin("romanian.txt"); std::ofstream fout("output.txt"); std::string line; int i; int count=0; string word; while(!fin.eof()) { getline(fin,line); for(i=0;i<line.length();i++) { if(line[i]==' ') { break; } cout<<line; } } system("PAUSE"); } the prog get crashed ... can any one please give me help … | |
**Question 1:** I want to create a save file for a game im creating in C++ problem is i can only use the vanilla headers in dev-cpp (which spawns another question id like to have answered/suggestions), my main problem id like to get past, is how the easiest format/way of … | |
Hi can u please help me with my assignment I need to create new type using new class -Myint- which is tepical to int type but the new one must be 10 bytes long insteade of 4 bytes so the quesion is how to set the size of my new … | |
Hello guys I have to make a test enviroment with two computers that both have VS2010 and Intel MPi installed. I finished installing the system today and I am trying to test it. Specifically I am trying to integrate the MPI library to VS. I have added the lib and … | |
Does anyone use boost program_options? What I'm trying to do is this: [code] --Files 1.jpg 2.jpg 3.jpg [/code] The only thing I know how to do is [code] --File1 1.jpg --File2 2.jpg --File3 3.jpg [/code] Does anyone know how to do this, and maybe store them in a vector<string>? Thanks, … | |
1. Assume the bank has 3 clients. Assume every client has 3 accounts. Use a two-dimensional array to store the credit of each account for each user. The array should look like this: Amount in account 1 for user 1 Amount in account 2 for user 1 Amount in account … | |
Write a complete program that have two functions named CylinderVolume() and CylinderArea(). Both functions should receive diameter and height of cylinder as parameters. Each function should return the volume and area respectively to main program. Given formula: Cylinder volume, v=πr2h Cylinder area, a=2π2r+2πrh where π is pi, r is radius … | |
Hello everybody! I'm trying to count the number of occurrences of each word in a text file. Problem situation requires to realize menu using "switch" statement (If file exist or not). There are following errors in my program ("case b" and "default" is not working): **[C++ Error] 03_int.cpp(61): E2126 Case … | |
I have downloaded the ftp library files from http://www.example-code.com/vcpp/ftp_passiveUpload.asp And set it in my code: #include "stdafx.h" #include "iostream" #include <CkFtp2.h> void ChilkatSample(void) int main(){ ChilkatSample(); return 0; } void ChilkatSample(void) { CkFtp2 ftp; bool success; // Any string unlocks the component for the 1st 30-days. success = ftp.UnlockComponent("Anything for … | |
hi programmer do a c++ project on library management system that enable search,update,add,delete and display data from it. | |
write a c++ project of scientific calculator | |
I want to check the perticular cell of the grid is focused or not, Which method will help me? | |
Hello everybody! I'm trying to display the result of difference of two-dimensional vectors using friend overloading. Builder shows the following error after compilation (line 40). What should I change for in my code in order to find the problem? Thanks in advance. **[C++ Error] 05_Part.cpp(40): E2034 Cannot convert 'double' to … | |
Hello. I would like to temporarelly store incomming win32 messages in a buffer. Then process all messages from that buffer manually. I actually have successfully stored and processed meesages in a buffer but I dont know if this is a best solution for my problem. LRESULT CALLBACK WinProc (HWND hWnd, … |
The End.