49,760 Topics

Member Avatar for
Member Avatar for akoloff

I am recently converting an application to the office style look, with a ribbon menu instead of regular menu. Surprisingly, I cannot change the title of the main window when using SetWindowText(). GetLastError() return success. The title which is displayed comes from IDR_MAINFRAME string and isn't changing no matter what …

0
51
Member Avatar for stereomatching

compiler vc2010 and gcc4.5.2(minGW) os : windows xp sp3 I am trying to implement a generic find_if function as std::find_if Below is my code [code] //code for estimating expanding time template<typename unaryOP> double timeCount(unaryOP op, size_t const LOOP = 1, char const* NAME = "function") { std::clock_t begin, end; begin …

Member Avatar for stereomatching
0
129
Member Avatar for papaSmurph
Member Avatar for iamthesgt

Is there a way to move data from one map to another without it being re-sorted? Ex: I have a map of [ICODE]<int, pair<string, int>[/ICODE] where the key is the number of vowels in the string (int) and the pair contains a moviename as string and rating as int (multiple …

Member Avatar for iamthesgt
0
203
Member Avatar for CaptainProg

Hi I'm trying to use the outportb() function to send a signal to a RS-232 serial port. I understand that in order to use the function I need to #include <dos.h> and <conio.h>. I am using Dev-C++ as my compiler and am having no luck when compiling the code. I …

Member Avatar for CaptainProg
0
3K
Member Avatar for geekme
Member Avatar for geekme

while writing a code in borland turbo c++ , I included the graphics library graphics.h but it gave the error- BGI graphics not supported under windows. following was my code [code] #include<graphics.h> #include<conio.h> int main() { int gd = DETECT, gm; initgraph(&gd,&gm,"C:\\TC\\BGI"); bar(100, 100, 200, 200); getch(); closegraph(); return 0; …

Member Avatar for Ancient Dragon
0
171
Member Avatar for SpecialForce

Hello everyone, I am trying to take a screenshot and save it as jpg. I have found a code and save it as bmp but the file size is pretty big. After searching a lot I found this thread [url]http://www.daniweb.com/forums/thread327090.html[/url] but I can't compile the code... :( I am trying …

Member Avatar for daviddoria
0
6K
Member Avatar for ronnieaka

firstly, please suggest some tags i should put for this post. onto the problem.. i saw this programming problem on projecteuler.net and wanted to solve it for fun. i solved it, but i tried first till 142857 the output was good, ok, satisfying here's the link where the problem is …

Member Avatar for ronnieaka
0
205
Member Avatar for shadowscape

hey everyone, i am attempting to create a simple dll in c++ that creates a timestamp, in the following format... [B]17042011233200[/B] Which is: [B]17/04/2011[/B] @ [B]23:32:00[/B] thus far, i have found a code ([B]see below[/B]), but after compiling with devc++ it doesnt seem to work, i am new with dll's …

Member Avatar for JasonHippy
0
148
Member Avatar for cafegeo

I have this function which reads in a workers.age from a structure. It determines how much taxes that worker will have to pay based on a base[i] salary that is also passed to that function. I am able to print out the net salary and amount of taxes paid for …

Member Avatar for cafegeo
0
425
Member Avatar for Labdabeta

I have the following trig functions, but I am wondering if there is a faster algorithm that I could implement: [CODE]static const double SINMIN=0.0009999998333333; static const double COSMIN=0.9999995000000417; static const double TANMIN=0.0010000003333334; static const double E=2.718281828459045235360; static const double PI=3.14159265358979323846; static const double MINVAL=0.01; double sin(double ax) { double x=aabs(ax); …

Member Avatar for mrnutty
0
632
Member Avatar for jimmymack

[CODE]// petcount.cpp - Script 9.1 #include <iostream> #include <string> // Declare the class. class Pet { public: // Constructor and destructor. Pet(std::string theName); ~Pet(); void eat(); void sleep(); // Static method that will // return the current value of count: static int getCount(); protected: std::string name; private: // count will …

Member Avatar for jimmymack
0
152
Member Avatar for Efficience

Hello Everyone , I have written a simple piece of code for reading an Image file(.png) in c but this code doesn't seem to work properly.Can anyone help me solve this problem of reading an image file in C ? Code I have written is :- [CODE] FILE *file; char …

Member Avatar for Efficience
0
2K
Member Avatar for Labdabeta

I need a way to do the following and I cannot think of one, this is what I have so far: [CODE]typedef Obj2*(*Reaction)(); class Obj1 { public: Reaction reaction; }; class Obj2 { public: unsigned int numobj1; Obj1 *objects; }; class Obj3:Obj2 {};[/CODE] Can you find any way of doing …

Member Avatar for Labdabeta
0
91
Member Avatar for yoannafrondon

SOS,SOS,SOS,SOS,SOS,SOS,SOS hello: I'm working with opencv and i have a problem with the function cvFindFundamentalMat(...), the code capture a window with a following warning: //------------------------------------- Windows has triggered a breakpoint in MySIFT.exe. This may be due to a corruption of the heap, which indicates a bug in MySIFT.exe or any …

0
53
Member Avatar for Tellalca

Hey; I am currently busy with multiprocessing and multithreading. There I saw a signal SIGCHLD which is an excellent zombie process cleaner by handling that signal. But when we are writing our handler function why we declaring it with an signal number arguement ? Is this arguement is automatically passed …

Member Avatar for nezachem
0
165
Member Avatar for ankit.4aug
Member Avatar for mkzamanopu
Member Avatar for penguino138

Ok so i want to make a program that calculates pi. Ive done that already but it only gives me so many decimal places. I want it to give me tons. Im using Dev C++ if that helps too. Here's my code: [CODE] #include <iostream.h> #include <math.h> int main() { …

Member Avatar for Derek Elensar
0
897
Member Avatar for Derek Elensar

Ok, so this is going to be a basic question that I should probably know, but it's baffling me right now... Also, be prewarned that this is a homework assignment I'm working on. I don't want answers, just guidance. I understand what I need top do(for the most part. obviously …

Member Avatar for Derek Elensar
0
175
Member Avatar for manny23

[CODE]ifndef POLY_H #define POLY_H class Poly { public: Poly() : first(0) { } void addTerm(double coeff, unsigned exponent); // add term (coeff^exponent) to the polynomial; // might just change coefficient of existing term, // or might insert new term; maintains terms // in order from greatest to least exponent private: …

Member Avatar for mrnutty
0
139
Member Avatar for programing

what the wrong for this code : [CODE]if (head==NULL)//1 if the list is embty cout<<"NO element in linked list "; else if { if (head==tail){ ///2- if we have one node delete head ; } [/CODE] how i can write the other case if valid addrese if the addrese in …

Member Avatar for programing
0
116
Member Avatar for choboja621

can you tell me what is the equivalent of: [CODE]flushall()[/CODE] in Turbo c++? Thanks! Im having a problem because of that. Or, what is the header file of it? Thanks AGAIN :D

Member Avatar for Narue
0
128
Member Avatar for dyingatmidnight

Hi there, I'm having trouble figuring out the setTimer function. Does anyone know for an example of using it in a non-MFC application? I mean something simple like printing 'Hello World!' every 5 seconds or something just so I can get a better idea of how its all supposed to …

Member Avatar for Ancient Dragon
0
378
Member Avatar for King_Alucard

I got a homework problem, I kind of got the idea for the code but I'm getting errors when I compile it, can somebody give me an idea of what I need to fix so I can make this work. The task is to write a program that contains a …

Member Avatar for Akill10
0
256
Member Avatar for penguino138

Hi. I wasbwondering if there was a way to have the user input something to a string and then write that as the filename. Please use my example of the string deckname.

Member Avatar for penguino138
0
271
Member Avatar for Tinee

Hi, I created a member file name "ConverterA" but it keep saying has no member. Please help me in this situation. What does it mean? [CODE]class Resistance { private: string ColorA[9], ColorB[10], ColorC[12], ColorD[12]; int Resistances, Tolerance; public: int SelectedOP2(); int Option(); int ConverterA(string); int ConverterB(string); int ConverterD(string); int Converter(string); …

Member Avatar for Akill10
0
4K
Member Avatar for tofugames

Hello, I am working on a program for school and this is my first experience with arrays of objects. I am passing the array of objects into a function, and from within that function I am running another function that takes an individual object from the array as an arguemnt …

Member Avatar for thekashyap
0
241
Member Avatar for bkoper16

I am trying to make my program print out the contents of a vector containing objects of class type Checking i want it to print the balance of each element in the vector but when i try to use [CODE]cout<<checking[1][/CODE] all i get is nonsense characters here is what i …

Member Avatar for Chilton
0
108

The End.