51,592 Topics
![]() | |
hi, im creating a simple image editor/drawer and im having problems with flicker when the canvas is refreshd on draw. ive got [CODE]frmPMain->DoubleBuffered = true;[/CODE] on my form, but im still getting bad flicker when i run my draw shape code such as [CODE]void Pixie_Draw::DragSquare( int X, int Y, int … | |
Hello, Ive been working on learning opencv by example and have learned lots but have some confusions/confusion in some parts, and would appreciate if you guys could help me out.. First off I have 5 matrices, and I want to combine them into one big matrix.. for this reason I … | |
Hi Acctualy i have a cinema project that i don't know how to start it and write it. If it is possible, please help me. I should write a project that show a cinema with 320 sits and some of them is for premiere, Twin, Gold and Economy. This is … | |
Here is some question i get from my friend recently ,it's a C++ programming question ,and i only managed to do some of it . So i hope can discuss these question over here , the way to do it.Thanks. Q1 . REQUEST FOR PROPOSAL When government ,military ,or commercial … | |
Hi, i need some pointers on how to approach my assignment. Dont want you to write me the code, just please point me in the right direction. I need to create a C++ program that requires the user to enter 10 student id numbers and the grade they received in … | |
Hi, Can anybody explain me how to create a sealed class on c++. thanks in advance, kedar | |
I have a hardware controller that I purchased from a vendor that provided a SDK in VB6. The primary reason I chose their controller was the class and SDK that I could get started with immediately. In the meantime, the vendor decided that dot net VS6 was best developed and … | |
Hi guys. At work we have lots of certificates to sign/encrypt/decrypt different kinds of documents/data and lately there's been a few occasions where we almost forgot to renew them before they expired. I am currently working on a small monitoring tool, that will notify us of certificates expiring soon. Trouble … | |
hi, i am trying to make a calculator and i have this code [CODE]#include<iostream> #include<sstream> using namespace std; int main (char argc) { int l = 1; for(l = l; l > 0; l--) { int q = -2; string n1 = "1+5"; int n; int e; stringstream(n1[q=q+2]) >> n; … | |
I have a long stream of numbers that I need to be able to input all at once (basically copy and paste) into an array somehow. I need to do this so I can make every pair of those numbers to correspond to a letter. For example, I need to … | |
I am trying to change assign the pointer "c" to the pointer "a" below using the function "change()", but I am doing something incorrectly, not exactly sure. The direct assignment within the main() function works (ie a = c), but does not work using the change function. [CODE] void change(float … | |
I want to make a Program that takes two inputs one initial number and one final number for example if I input 1 as the beginning number and 13 as the final, I would like the program to output the Fibonacci sequence: 1,1,2,3,5,8,13.. I hope someone understands it.. Pleease i … | |
The objective: take an integer (e.g. 1000000), and by using recursion, ultimately return this string: 1,000,000. Can anyone figure out how this problem could be solved specifically by taking an integer and returning a string? string addCommas(int n) { // ??? } Thanks for any help or direction | |
Hello, for my assignment, I have to implement 2D Gaussian convolution using 1D Gaussian masks. I have two pgm files. I know the theory but I do not know where to start and how to deal with pixels. can anybody help me? | |
I am building a library of matrix and vector operations. As my library has grown bigger, I have found that there are MANY by element operations which I need to program. For example, if the user wants to multiply each element in the matrix by 2, or if the user … | |
In C# if you want the thread to pause you would use: [CODE]System.Threading.Thread.Sleep(300);[/CODE] However, I cannot seem to find a C++ equivalent to this? How would I do this, or is it just not possible? Any help is appreciated. | |
(Business Accounting) CS Bank Limited updates its customers’ accounts at the end of each month. The bank offers two types of accounts: savings accounts (s) and checking accounts (c). Every customer must maintain a minimum balance. If a customer’s balance falls below the minimum balance, there is a service charge … | |
Hello, my programming project requires me to write an overloaded function max that takes two or three parameters and returns the largest of them. I'm having trouble with the program outputting the largest number, with my code below it just says the largest number is 0 no matter what numbers … | |
Good day to all of you. I'm looking for advice for my code below. My code was intend to print out a set of asterisk base on the rows and columns in my array(cinema[20][23]). The code works fine and i was trying to print out numbers (which is from 1 … | |
* How does stringstream work? Someone kind of explained it like, in cout it sends it to "standard out stream" or something, and using stringstream, you stream it into that instead. [CODE]stringstream a; int b=12; a << b;[/CODE] * How can it convert characters into int and such? [CODE] char … | |
[CODE=c++] #include <QtGui> class MaskedLabel : public QLabel { protected: void resizeEvent(QResizeEvent* event) { QLabel::resizeEvent(event); QPixmap pixmap(size()); pixmap.fill(Qt::transparent); QPainter::setRedirected(this, &pixmap); QPaintEvent pe(rect()); paintEvent(&pe); QPainter::restoreRedirected(this); setMask(pixmap.mask()); } }; int main(int argc, char* argv[]) { QApplication a(argc, argv); QLabel* label = new MaskedLabel(); label->setText("Qt Centre!"); QFont font = label->font(); font.setPointSize(72); label->setFont(font); label->show(); … | |
Hello, am a newbie in c#.. i have a question, how do you use read data from file and use it? my data file is something like this: Name amount1 amount2 [CODE]johen 1234 231411[/CODE] i have this code so far: [CODE]using System; using System.Data; using System.IO; class Class1 { static … | |
Dear friends: I run my C++ programm in opensuse linux, after it sucessfully run, the system give me the following feedback.Could you please tell me what wrong with my program. [CODE]*** glibc detected *** ./flowingheat: double free or corruption (!prev): 0x00000000007e28b0 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x733b6)[0x7f9b6dc2c3b6] /lib64/libc.so.6(cfree+0x6c)[0x7f9b6dc312dc] ./flowingheat[0x411cde] ./flowingheat[0x40e9fe] ./flowingheat[0x40af3b] … | |
Dear friends: I have a txt file to read. I only need the number of ELEMENTS and the ENTITIY NAME. which function should i use to read in these two values. Regards [CODE]GROUP: 2 ELEMENTS: 4 NODES: 2 GEOMETRY: 0 TYPE: 0 ENTITY NAME: WALL_LEFT 33 16 10 34 20 … | |
Looking for a good manual on c++. Anyone know where i can get one? Thanks Jeffrey Revell Reade | |
[CODE]// name-printer.cpp : Defines the entry point for the console application. // #include <stdlib.h> #include <iostream> #include <iomanip> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main () { string inputNameString; //the Name string that is entered by the user string names[3]; // A string array that will … | |
Dear friends: I get different resutls when copy my code from windows to linux system. the string comparion " if( keyword==Key[0] ) " is true in window system, but it is false in linux system. I am really confused about this.I copy the same source code and the same input … | |
I found a page saying that int a = 12; and int a (12); do the same thing. But is there something special with the int a (12); way of initializing a variables? Like, you can do: string test(5, '-'); which would make test = ----- I couldn't seem to … | |
let say i have a class A (base) class B , C, D also inherit A [ multiple ] then class E inherit class B, C, D... But class E also want to inherit class A [ multilevel ] *I want to use class A protected function in class E... … | |
Hi ever one i make a function that print the reverse integer e.g if we input 12345 it print 54321 but the problem is that when i use return b; it print 5 4 3 2 1 1 and when remove return b; then it prints 5 4 3 2 … | |
I'm reading from a file into an array of objects i created called Team. The file is written in this format: Shane Vitorino CF 8 8 H H H B B O O K Ben Francisco ....... The first line is the player's name, the second line is his position, … | |
Hi, I am writing an application in which I make a map of strategies keyed by a string symbol. In order to construct the strategies I pass the constructor a filename, out of which it reads out some data, into an initializing map. It is possible that some data might … | |
What to code? post useful things that you do repetitively on a daily basis(must be non Windows or Mac ) specific that you would like automated but don't have the time to code?(as my machine is too slow to run windows or mac sorry :( ) | |
OK....sigh... I need to link to lwinmm to use playsound and stuff Looked around and looked like I needed to do it like this: I'm using Codeblocks [CODE] #include <iostream> #include<windows.h> #include <mmsystem.h> #pragma comment (lib, "winmm.lib") using namespace std; int main() { PlaySound((LPCWSTR) "c:\\Snap ya fingers.wav", NULL, SND_FILENAME | … | |
hey guys... i wanted to know how to make multiple conditions such that each condition has arange of values...i have written the following code but doesnt work help me quick plz. It is aPIC program for monitoring the ADC value and sending to LCD [CODE]if(ADRESL==0x00) {lcddata('O'); DELAY(2); lcddata('F'); DELAY(2); lcddata('F'); … | |
Hi, I am trying to read two strings per line and store them in strings so i can use them in my program.for example if this is my input file: [CODE]cat:yellow dog:blue chicken:red[/CODE] i wan to store cat as animal1 string dog as animal2 string and yellow as colour1 string … | |
Im trying to output the population increase for a population. the problem is my for loop doesn't increment or add correctly. here is a sample output. i made it easy with no death rate and a population of 100 to easily calculate the increase in my head. Starting Population: 100 … | |
So I'm fairly new to C++ and I'm wondering if this would be possible and what the code would look like. I'm trying to create an ongoing process that monitors when a certain program does something and launches another program when that thing happens. Example: I have Steam open and … | |
[CODE] #include <iostream> using namespace std; void someFunction(bool& a); int main() { bool a = true; someFunction(a); if( a ) cout <<"a = true"; else cout <<"a = false"; } void someFunction(bool& a) { a = false; } [/CODE] This will print out "a = false". bool& a in the … | |
PLease help me with these questions, I was interviewed for thses just today Q1)Can we delare constant data members inside a class? Q2)does friend function violates encapsulation/data hiding? Q3)what are the types of polymorhphism you know? Q4)why do you need virtual functions? Q5)Can we do something like\ int & = … | |
I have .xls or .xlxs and there I have Bar with number and text.... I want to use number and text form this file.... e.g. boys in class (cell on form) 24 (other cell on form) | |
[B]Hello all I am a student majoring in Beginner Software ENGINEERING I do not have much experience in game development n has asked us to develop a game I hope 2 to get some help here even sources that need to extend it And thank you all[/B] | |
I am using visual C++ 2005(native C++) I got the error error C2065: 'CString' : undeclared identifier for the following code, [CODE]#include <cstring> using namespace std; int main(){ CString ab; ab="a"; }[/CODE] what is the problem? | |
Hi all! I have been hacking some Qt before, but now I want to try to code in Gtk and std C++. I have been searching the web but I can not realy find what I am looking for. As I can see Gtk is written in C. Is it … ![]() | |
I programmed this vector class to support different types and different amount of dimensions. (class T,int D) D is the dimension. I don't use templates much and I'm running into an error, my constructors aren't working. Here is my class [CODE]#include <stdio.h> #include <stdarg.h> template <class T,int D> class Vector … | |
Hi, how can I make program execute code when I will turn my PC off or hybernate him? | |
Hi everyone! I am using a dll to hook keyboard strokes for my application. The hook works fine, but now i want to disable some keystrokes while my application is running. So i did the following : [CODE]_declspec(dllexport) LRESULT CALLBACK KBHookProc(int Code, WPARAM wParam, LPARAM lParam) { if (Code < … | |
Hi, I am making an student registration program as my project in school. But I had some problems making it. Our professor asked us to make an program where there are lists of subjects offered. Then the student will choose what subject/subjects he/she likes, then it will be computed. The … | |
I created a small c++ program. Now i wanted it to create an .exe file. Once i compile, i get the exe file in my BIN folder.. but, the alignment of the files are not correct. Well i do get the correct alignment in turbo c++ compiling..(ctrl + f9).. but … |
The End.