49,761 Topics

Member Avatar for
Member Avatar for stereomatching

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 …

0
73
Member Avatar for Valiantangel

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 <<' …

Member Avatar for MandrewP
0
117
Member Avatar for suhasgh

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......??

Member Avatar for suhasgh
0
110
Member Avatar for Labdabeta

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 …

Member Avatar for Labdabeta
0
219
Member Avatar for Valiantangel

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 …

Member Avatar for Valiantangel
0
98
Member Avatar for swissknife007
Member Avatar for Gribouillis
0
151
Member Avatar for mrnutty

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 …

Member Avatar for nezachem
1
670
Member Avatar for tedtdu

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) != …

Member Avatar for Labdabeta
0
254
Member Avatar for SCass2010

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, …

Member Avatar for mike_2000_17
0
2K
Member Avatar for Valiantangel

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 …

Member Avatar for gusano79
0
128
Member Avatar for sharath_137

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.

Member Avatar for Banfa
0
590
Member Avatar for Lucaci Andrew

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 …

Member Avatar for Lucaci Andrew
0
167
Member Avatar for pkfx

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.

Member Avatar for deceptikon
0
104
Member Avatar for ddm

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 …

Member Avatar for MonsieurPointer
0
97
Member Avatar for smarty_t2

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 …

Member Avatar for ravenous
0
2K
Member Avatar for dinosaur123

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 …

Member Avatar for VernonDozier
0
416
Member Avatar for risen375

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; …

Member Avatar for histrungalot
0
127
Member Avatar for caltech

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 …

Member Avatar for mike_2000_17
0
359
Member Avatar for vedro-compota

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 - …

Member Avatar for WaltP
0
167
Member Avatar for DAlexNagy

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 …

0
122
Member Avatar for bobanderson90

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]; …

Member Avatar for mike_2000_17
0
1K
Member Avatar for dshiells

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 …

Member Avatar for dshiells
0
2K
Member Avatar for jonnyboy12

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 …

Member Avatar for Milton Neal
0
83
Member Avatar for native99

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 ); …

Member Avatar for Banfa
0
241
Member Avatar for triumphost

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.

Member Avatar for triumphost
0
406
Member Avatar for mayank.dyl

Without using /,% and * operators. write a function to divide a number by 3, itoa() function is available.

Member Avatar for mayank.dyl
0
306
Member Avatar for sandz24

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 …

Member Avatar for raptr_dflo
0
922
Member Avatar for Z33shan

hello :) i'm looking for some good Combination Optimization Algorithm, which is easy to code aswell... (combination optimization algorithms like "Hungarian Algorithm", etc.) thanks :)

Member Avatar for Z33shan
0
145
Member Avatar for SAM2012

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 …

Member Avatar for emilo35
0
172
Member Avatar for ashboi

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> …

Member Avatar for ashboi
0
160

The End.