49,761 Topics
| |
I also work on copyright protection project using DCT on opencv. I have a problem, I have a code in opencv2.4 and I want to chenage to 2.1, but I can't do it. please help me Mat colorImageROI= dct_logo(cv::Rect(dct_image.cols/2,dct_image.rows,dct_logo.cols,dct_logo.rows)); // obtain iterator at initial position. Mat_::iterator srcIt = dct_logo.begin(); // … | |
hey guys reading deitel book and have a little problem with the code that I cant understand #include <iostream> using std::cout; using std::endl; #include <iomanip> using std::setw; int main() { // define array sizes const int responseSize = 40; // size of array responses const int frequencySize = 11; // … | |
Hey folks, I am working on a project (its a continuation of my previous project)... but with a few additions. First off, i have to use class templates... I have used them before, but not when working with multiple class definitions and multiple files. Below i will post sections of … | |
Hey guys! I'm having a problem and I hope you guys can help me figure it out. I have to create a program that prints all the armstrong numbers from a user given lower and upper bound. I have a lot of the code but I can't seem to get … | |
Make a program that counts, identifying every value divisible by 3 and 5. If it is divisible by 3, put an asterisk (*) beside it. If it is divisible by 5, put a tilde (~) beside it. Print the first 200 values. Can someone help me? i don't actually know … | |
Hi Everyone, I am taking C++ for the second time and I am understanding it better this time around. I have an assignment that needs a switch (got that, know how to do it), I have put if/else statements inside of the cases. The thing I can't get to work … | |
I am using C++/Qt4.3.0.Here I am exporting an html report to .doc file containing some images that are created at run time.For that, I have used html and then inserted the html text to QString and then to QTextEdit..Now I want to make this .doc file system independent so the … | |
I want to be able to make a program that emulates what a human at a computer can do. IE: I want to be able to read the visual information of a window (a 2d array of colour would be perfect) and be able to send virtual key syms and … | |
hii i am a beginner in c++ and i have got an assignment to do. below is my code and i am unable to execute it so can anyone help me out !! please !!! I am confused on how to replace the room no. in change_room() function and case … | |
I've figured it out but I want to know HOW. When I do code I try and figure out the math behind it on the side so I know exactly what is going on. But this time has stumped me. I know what the code is suppose to be, so … | |
Hi I'm hoping to get some starting points here in a subject that scares me, RegExp. I've looked at a couple of tutorials but they all seem to be based on std::string. I'd like to use std::tr1::regex but I don't know where to start or even if it's possible without … | |
*Hello people of the DaniWebs! It's been a long time since I've been talking and asking here, under the name of **katmai539**. I've lost account information and also the email address linked to it. I haven't been active in the software development-branch for the past few years but recently I … | |
I am getting results from a routine which are unexpected from me. here is athe code. void MyTestFunc(){ u_char MyTest_u_char[10] = {'a','b','c','d','e','f','g','h','i','j'}; u_char * MyTest_u_char2 = new u_char[8]; memcpy(MyTest_u_char2,&MyTest_u_char[1],sizeof(u_char)*8); int raw_len = sizeof(MyTest_u_char2) + 1; string std_str(MyTest_u_char2, MyTest_u_char2 + raw_len); cout << std_str << endl; // expecting bcdefghi . getting … | |
Ive just started going through and developing basic applications using the win32 API, and couple of times I have come across people mentioning that directly using win32 is not wise...I've just started using the library and personally think its nice and easy to use. However Ive been seeing things like … | |
Hello, I need to write a function that would take a string and break it up into tokens (ie words, numbers, and punctuation). First it needs to break up the string and store them into an array called Token[]. Obviously a for loop needs to written however should I just … | |
HI , everyone can you please write a program for me , I have a set with 5 things in it thats line a={1,2,3,4,5} but it could be everything possible and there are subsets like b={1} c{1,2} d{1,2,4,5} but I cant write the progam so if you can write a … | |
Hey, I might be having a blonde moment but here goes.. I'm trying to split a massive 1D vector into blocks at different places (If that makes sense), it should basically go like this: 0 201 401 601 801 .. .. .., 57201 2 202 402 602 .. .. .. … | |
| //==============================================================================// // RPS (Rock Paper Scissors) // Author: SoulPour777 / Janrae Mendoza // A Simple C++ Game // =============================================================================// #include <iostream> #include <cstdlib> #include <ctime> using namespace std; string player; string player2; int wins; int loses; int roll; int draws; void error(); void gamePlay(); void Scene_Result_Display () { cout << … |
Hey so for a couple of months now Ive been facinated with c++ and have been going through various tutorials and examples of creating console based applications dealing with arrays,pointers, classes, etc.So I really want to get into the GUI side of it. But from word of mouth I hear … | |
can anyone give me a cool c++ program using alloc and free you can use c also | |
#include<stdio.h> #include<conio.h> void main() { float a[5][5],x[3];float t,s; int i,j,k; printf("enter a matrix of order 3*4"); for(i=0;i<3;i++) { for(j=0;j<4;j++) { scanf("%f",&a[i][j]); } } for(i=0;i<3;i++) { for(j=0;j<4;j++) printf("%f ",a[i][j]); printf("\n"); } for(i=0;i<=1;i++) { for(j=i+1;j<=2;j++) { t=a[j][i]/a[i][i]; for(k=i;k<=3;k++) a[j][k]=a[j][k]-t*a[i][k]; } } printf("The upper triangular matrix is as\n"); for(i=0;i<3;i++) { for(j=0;j<4;j++) printf(" %f",a[i][j]); … | |
Hello everyone first time posting here, I have spent hours trying to figure out how to write this program that our instructor has given to us as an assignment. http://en.m.wikipedia.org/wiki/Bogosort#section_3Instructions are bellow Frequently, the temperatures on the news are given in Centigrade rather than Fahrenheit. The formula for conversion is … | |
I am currently working on a dice game. Where The user rolls a pair of dice first, so lets say he rolled and Dice 1 = 2 and Dice 2 = 3. So the total is 5 now. Now, he needs to get 5 (total) again in order to win, … | |
Hi There, I need to re-write any mention of .tellg() in my code as the function is not supported on the desired hardware. I have the following lines of code: getline(file,line); { std::istringstream stream(line); stream >> first >> second >> third >> forth; UINT32 file_pos = stream.tellg(); file_pos++; fifth = … | |
I'm learning several languages. 5 at once but I took a liking to one specific feature of java. The This keyword. From their tutorial: /*Within an instance method or a constructor, this is a reference to the current object — the object whose method or constructor is being called. You … | |
Hi , I try to build mobile application , this application will know the book name you want and tell you price and Customer Reviews evaluation from amzon.com but the problem I can not read web page to get price and Customer Reviews evaluation from it by c++ code , … | |
I'm trying to understand something. Best explained through an example. My understanding is that a Class Adapter (lets say written in C++) is for a class written in PHP (hypothetical). C++ - Class A - Adapter PHP - Class B - Adabtee. If I'm trying to access Class B through … | |
Okay, I want to start off saying that yes this is a homework assignment but no I don't just want the answer for it. I actually want to learn how to work this. Having said that, I was assigned to determine whether a number is a perfect number and print … | |
Is there a way to do the following better? Current I write a set of pixels to a file called "PngFile.bmp". Then I read that file back in as a PNG encoded buffer.. Then I save that buffer back to the harddisk and delete "PngFile.bmp" /*std::fstream PngFile(TempPath, std::fstream::out | std::fstream::app … | |
Hi! I am using concert tech to link Cplex with C++ Coding. There is an error that pop up when I tried to run: error C2676: binary '+=' : 'IloNumVar' does not define this operator or a conversion to a type acceptable to the predefined operator Below is a portion … |
The End.