51,592 Topics

Member Avatar for
Member Avatar for OnIIcE

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 …

Member Avatar for luthor112
0
197
Member Avatar for ipunished

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 …

Member Avatar for ipunished
0
253
Member Avatar for Mojtabarahimi

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 …

0
97
Member Avatar for spothao

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 …

Member Avatar for spothao
-1
275
Member Avatar for munnate

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 …

Member Avatar for moh0
0
357
Member Avatar for kedar_challa

Hi, Can anybody explain me how to create a sealed class on c++. thanks in advance, kedar

Member Avatar for Karty619
0
725
Member Avatar for zp18zp18

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 …

Member Avatar for zp18zp18
0
206
Member Avatar for mhaber

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 …

Member Avatar for mhaber
0
6K
Member Avatar for thecoolman5

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

Member Avatar for mike_2000_17
0
1K
Member Avatar for thedalek

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 …

Member Avatar for thedalek
0
201
Member Avatar for spetro3387

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 …

Member Avatar for spetro3387
0
152
Member Avatar for rayden150

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 …

Member Avatar for sergent
-2
256
Member Avatar for old_kid

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

Member Avatar for m4ster_r0shi
0
144
Member Avatar for newack

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?

Member Avatar for newack
0
319
Member Avatar for MareoRaft

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 …

Member Avatar for mike_2000_17
0
153
Member Avatar for jmurph333

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.

Member Avatar for jmurph333
0
156
Member Avatar for mehaksyeda@gmai
Member Avatar for imraannaimullah

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

Member Avatar for WaltP
-1
161
Member Avatar for radiata

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 …

Member Avatar for Nick Evan
0
206
Member Avatar for vergil1983

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 …

Member Avatar for zomgser
0
229
Member Avatar for sha11e

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

Member Avatar for Narue
0
304
Member Avatar for Luckychap

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

0
100
Member Avatar for mrar85

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 …

Member Avatar for mrar85
0
344
Member Avatar for ztdep

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

Member Avatar for Caligulaminus
0
142
Member Avatar for ztdep

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 …

Member Avatar for mrar85
0
95
Member Avatar for visual28
Member Avatar for JasonHippy
0
85
Member Avatar for byrosport

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

Member Avatar for WaltP
0
199
Member Avatar for ztdep

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 …

Member Avatar for mrnutty
0
241
Member Avatar for sha11e

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 …

Member Avatar for Narue
0
102
Member Avatar for murnesty

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

Member Avatar for Ancient Dragon
0
122
Member Avatar for Rizi004

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 …

Member Avatar for Rizi004
0
168
Member Avatar for fsefsef23

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

Member Avatar for fsefsef23
0
251
Member Avatar for deliezer

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 …

Member Avatar for deliezer
0
331
Member Avatar for Celtrix

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 :( )

Member Avatar for Celtrix
0
111
Member Avatar for sha11e

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

Member Avatar for saeedmmmm
0
5K
Member Avatar for Riaz Haider

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

Member Avatar for Riaz Haider
0
316
Member Avatar for milan2011

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 …

Member Avatar for Lyandor
0
170
Member Avatar for clickspiker23

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 …

Member Avatar for m4ster_r0shi
0
137
Member Avatar for Syrne

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 …

Member Avatar for Ancient Dragon
0
330
Member Avatar for sha11e

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

Member Avatar for pseudorandom21
0
272
Member Avatar for munitjsr2

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

Member Avatar for kanuxy
-2
185
Member Avatar for yobbko

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)

Member Avatar for Tellalca
0
125
Member Avatar for MoNaLiZaOman

[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]

Member Avatar for Tellalca
0
99
Member Avatar for jack1234

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?

Member Avatar for Yellaiah
0
10K
Member Avatar for marcux

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 …

Member Avatar for GreenDay2001
0
226
Member Avatar for u8sand

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 …

Member Avatar for mike_2000_17
0
249
Member Avatar for senergy
Member Avatar for ktsangop
0
144
Member Avatar for ktsangop

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

Member Avatar for ktsangop
0
1K
Member Avatar for jadzrev13

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 …

Member Avatar for jadzrev13
0
3K
Member Avatar for Riteman

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 …

Member Avatar for thecoolman5
0
176

The End.