49,761 Topics
| |
Recently I am studying GIL and concept(htp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf) and encounter a lot of problems. concept ChannelConcept<typename T> : EqualityComparable<T> { typename value_type = T; // use channel_traits<T>::value_type to access it where ChannelValueConcept<value_type>; //tag1 typename reference = T&; // use channel_traits<T>::reference to access it typename pointer = T*; // use channel_traits<T>::pointer to … | |
Hi i am finding this a challenge.I am suppose to get 12345 12345 but my below code is giving me 1112314151 1222324252 what mistake am i making? #include <iostream> using namespace std; int main() { int row,column; for(row=1;row < 3;row++) { for(column=1 ;column < 6; column++) cout <<column<< row <<' … | |
Hey i have one questio .....plzz do answer........ i have 3 classes A,B and D A is base class........ if B is derived from A.. can we derive C from both A and B......?? | |
I have now read a total of 5 different winsock tutorials and I still do not get how sockets work! Could somebody please explain how to make a program that will allow n computers to share data with each other. As an example could somebody make a 'game' with the … | |
i was learning about Functions from a book.Keyed in the following code to my visual studio express and got two errors: expect a declaration and '{' : missing function header(old-style formal list. what do they mean? Does this have to do with ans/isoi std? #include <iostream> using namespace std; void … | |
I am trying to implement a program to solve 20 + equations . what algo should i use | |
This question is from code chef, named Odd. I believe this is a good problem to play with for all levels. If I can solve it surely anyone else can, cough * only if pi is fake* cough*. Here is the question : [ICODE]The captain of the ship TITANIC is … | |
Dear all. please kindly but freely provide of your ideas and thought about following. I need to get binary bits of variety of files regardless of ASCII, Unicode, or even non-printable etc. I searched following seems to be commonly used but not for all. bits[i] = ((1<<i) & c) != … | |
Hi everyone, Wondering if anyone could help with a minor problem... I have a class that contains a std::map that stores pointers to various objects as a void pointer and a name for the object, so within the class I have a template function where the object type is passed, … | |
int main() My code works fine...i will be using const later ,hence my variable are capital letters.What i need a little help is when the NUM_VALUE is negative.If i am not wrong its call integer division error.(where one or more operand is negative.How can i avoild this? I inserted under … | |
hi, Can anyone tell me the exact difference between memset,malloc and calloc.I am new to c++, Know this is simple question to ask in c++ but i am getting lot of confusions in using them and i want to knw whr exactly i can use these. Regards, Sharath. | |
Hi. So my problem is that I can't save into a vector throughout a function, but I can save directly in the vector. /* * asd.cpp * asd.cpp is licensed under GNU GENERAL PUBLIC LICENSE * Created on: May 3, 2012 * Author: sin */ #include <iostream> #include <string> #include … | |
ive declared and integer array and i need to know how the user can input a single input of "2 4 6 3 5 6 7 5 3 5 6" and get each individal digit into each index of the array and help would be greatly appreciated. | |
Design a CPU Timer class (you may name it CPUTimer). This class should allow the user to start timer, stop timer, compute delta time and print the lapsed CPU time of any block of code in a program. #pragma once #include <iostream> #include <cmath> #include <ctime> #ifndef CPUTimer_h #define CPUTimer_h … | |
I wrote a program in C# for my discrete mathematics class and it worked absolutely fine. My teacher asked me to submit the code in c++ so she can run it on her mac and so I created a new project and typed the code in. After changing everything required … | |
Hello, I am having trouble with a program I am writing. The problem is that I need to take information from a text file, read it, and then output the information into another text file. I keep getting this output: > <ProductSummary>0015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A0 </ProductSummary> I need it to output something like … | |
Hi I need help with this program. When I run this program, it will not print out the correct kilograms which always displays 0. Please help #include <iostream> #include <istream> #include <iomanip> #include <vector> using std::vector; using namespace std; using std::endl; using std::setw; struct PatientInfo { string name; double weight; … | |
Here's my code. (Lines of interest: 49, 138, and 162; rest of the code works fine.) #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <algorithm> #include <cstdlib> #include <conio.h> using namespace std; class Records { public: string name; int hours; double rate; int age; double pay; double tax; double … | |
hi there) my brothers-programmers) please tell me - how to get double type character by character - i need make custom realization of fprintf - so it's necessary for me to show double type numder on the screen. (For integer type this problem could be solved by subtracting 32 - … | |
Hi all! I am looking for some advice on how to best design C++ programs that read, write, and update data in MySQL databases. I have completed a system that successfully does this but I'm not sure if I designed it the right way to take advantage of OOP principles … | |
I want to push a value to a stack using the assignment operator, I need some help with this.. Thanks Stack s; float x = 5; s = x; class Stack { public: Stack(); float push(float value); float pop(); int Size(); float operator = (const float &right); private: float values[30]; … | |
Hi all, I'm sure this is a n00b question, but I can't seem to get my head around it! I have a 4 BYTE array which I want to display as a decimal value. For example, in the array it contains the hex values: 00 05 7d a4, and I … | |
Hello I have a large project that i bult with windows forms. When I drag a form on my screen it will move with no problem. When part of the form is overlaping the edge of my monitor and i try to drag it , the form will shutter when … | |
i'm building a simple code in wdk in "native subsystem" i have a library that overload new and delete operator here is the code: header file #include<ntddk.h> #define HEAP_ZERO_MEMORY 0x00000008 #define HEAP_GROWABLE 0x00000002 typedef NTSTATUS (NTAPI * PRTL_HEAP_COMMIT_ROUTINE)( IN PVOID Base, IN OUT PVOID *CommitAddress, IN OUT PSIZE_T CommitSize ); … | |
I have an application that will be minimized and running in the background. I want this application to have it's own moveable mouse so that it does not use my current mouse. How can I accomplish this? I'm not exactly sure where to start to create a mouse for it. | |
Without using /,% and * operators. write a function to divide a number by 3, itoa() function is available. | |
Hello everyone and good day!!! I'm trying to embedd an image watermark to another image for copyright protection and I plan to use DCT and embedding the watermark in the middle band coefficeint of the host image. The problem is I don't know which of the formulas to use since … | |
hello :) i'm looking for some good Combination Optimization Algorithm, which is easy to code aswell... (combination optimization algorithms like "Hungarian Algorithm", etc.) thanks :) | |
I have queue class as below public class queue { public: queue(); ~queue(); bool Empty() const; void Enqueue(message^); void Dequeue(); void DisplayAll() const; private: gcroot<String^> bindingkey; queue(queue const& obj); ListNode* head; ListNode* tail; }; queue::queue():head(nullptr), tail(nullptr) {} queue::~queue() { while (head != nullptr) { Dequeue(); } } //bool queue::Empty() const … | |
I'm getting some errors with my code, & cant seem to find where the problems are. Basically I'm making a student class that calls out the student id & name. I hope someone can point me in the righ direction to get this code working. Thank you student.cpp: #include <iostream> … |
The End.