49,761 Topics

Member Avatar for
Member Avatar for CppBuilder2006

I have region: [code] Region r[/code] and I have a point: [code]PointF p[/code] is there any method that determines whether p is in r? something like this [code] bool is_p_in_r = graphics.Determine(p,r); if(is_p_in_r) Execute("theMan.kil"); :) [/code]

Member Avatar for CppBuilder2006
0
147
Member Avatar for Behi Jon

Hi, What kind of project is required for running this program in Visual C++ : [code] #include "ChessGame.h" int __stdcall WinMain() { Application::Run( new ChessGame() ); return 0; } [/code] Thanks ............................

Member Avatar for Ancient Dragon
0
102
Member Avatar for johndoe444

hi what is the meaning of const in the declaration below: [CODE]const int*const Method3(const int*const&)const;[/CODE] Thanks

Member Avatar for Dave Sinkula
0
400
Member Avatar for Androggles

Hey :) I have written this code, but it seems that theres an error in it, that i can't find. When i try to compile it i get this error: Call to undefined function 'sleep' in function main(). I know it has something to do with that sleep function, because …

Member Avatar for Excizted
1
459
Member Avatar for gedas

Hey everyone, im trying to get to know vectors but i came to a point that my current knowledge stops and i need more help, i found a program which i would like to understand but i couldn't figure it out. here is the code: [code]#include<iostream> #include<vector> #include<string> #include<iterator> using …

Member Avatar for gedas
0
136
Member Avatar for bigsurya

Why do we overload operators ? Is it possible to add/subtract objects of a class without using overloaded '+' operator ?

Member Avatar for Narue
0
93
Member Avatar for monocog

Before I begin, let me start by saying that this is NOT homework. I am also not enrolled in a C++ class. I am simply trying to learn C++ as I have time. I am using random assigments/tutorials/whatever I can find on the net and shopping amazon for books. I'm …

Member Avatar for bigsurya
0
126
Member Avatar for Nhevik
Member Avatar for Androggles

Hello I am very, very new to this C++, and i have been working on something that could help us with something, but thats a long story... Anyways, i want the program to first delete a file then wait some time, and then delete another file. I got it to …

Member Avatar for Androggles
0
219
Member Avatar for rmawatson

Hello, I was hoping someone might be able to clear up some questions I have on casting Objects vs Casting Pointers in C++. The first example below is compilaining that the constructor of XDeviceMotionEvent cannot construct a new XDeviceMotionEvent object from an _XEvent&. What I dont understand about this is …

Member Avatar for Narue
0
237
Member Avatar for astropirate

Greetings all Is it possable to get the UDP packet header info from the function recv()? i specifically want the packet length data. If not with recv() is there any other way of doing this? (besides raw sockets)

0
38
Member Avatar for CppBuilder2006

what is the difference between memory allocated by [ICODE]GlobalAlloc[/ICODE] & memory allocated by [ICODE]new[/ICODE]. is GlobalAlloc used in C++ or is it for C? :)

Member Avatar for CppBuilder2006
0
273
Member Avatar for peterpanic

I am trying to take an integer argument (1-65536) and turn it into two hex characters. If argument -t is -t20 then I need 0x01 0x04 in a character array for sending through a socket. Relavent snippets: [CODE] char tstr[3]; char timetxt[6]; struct pulsepayload { char chan; char state; char …

Member Avatar for WaltP
0
283
Member Avatar for ge6a93

Hi, in my MFC dialog app i have a message, saying "Press any key to go on" I wanna make it in the way, that when the user presses any key it must do something(i have already done that). So, how can i check if any key is pressed using …

Member Avatar for Duoas
0
118
Member Avatar for mcuk2001

[URL="http://i50.tinypic.com/6homdv.jpg"]http://i50.tinypic.com/6homdv.jpg[/URL] heeeeeeeeeeeeeeeelppppppppppp plz

Member Avatar for mcuk2001
-1
95
Member Avatar for amatallah
Member Avatar for slim2hott

Hi everyone. Recently I have been working on an XOR encryptor/decryptor. I have looked at tutorials to get ideas. Now, I have created my encryptor/decryptor and I have absolutely messed it up i think, because the output is not right. What I am trying to do here is: [LIST] [*]Creating …

Member Avatar for slim2hott
0
176
Member Avatar for johndoe444

Hi, [CODE]class base { int i, j; public: void set(int a, int b) { i=a; j=b; } void show() { cout << i << " " << j << "\n"; } }; class derived : public base { int k; public: derived(int x) { k=x; } void showk() { cout …

Member Avatar for Bench
0
110
Member Avatar for harryhaaren

Hey all, Slight continuation on[URL="http://www.daniweb.com/forums/post1092017.html"] this thread.. [/URL] Not essential though. Hence the new thread. The problem is that when I declare a [icode]static[/icode] attribute of a class, and later try using it in a static member function , I get a compile time error. The problem: (with code) OscServer.hpp …

Member Avatar for harryhaaren
0
162
Member Avatar for PDB1982

I'm trying to study for my A+ exam, and in doing so I am having trouble finding a free computer program that asks relevant questions. With that being said, I'm looking to build my own which will help myself, and possbily future generations. My problem is, that I don't know …

Member Avatar for iamthwee
0
83
Member Avatar for stoudemire132

these are my homeworks please help me... S8. create a class with the name complex. For that class, the requirements are; -define variables as relevant as possible for the above class ( re and im of type double ) ; -the class constructor ; -function display ; -functions to return …

Member Avatar for iamthwee
-3
110
Member Avatar for jbarwick

consider the following (illustrative .. no NULL checking): [CODE]class MS { public: TCHAR _buff[1024]; MS() { ZeroMemory(_buff,sizeof(_buff)); } ~MS() { } LPCTSTR operator LPCTSTR() { return _buff; } void operator = (LPCTSTR s) { _tcscpy(_buff,s); } BOOL operator == (LPCTSTR b) { return _tcscmp(_buff,b)==0; } BOOL operator == (MS &m) …

Member Avatar for Narue
0
262
Member Avatar for arpit.mishra

Hi, I have a question regarding assignment operator. Can I use an overloaded assignment operator for copying character pointers. Thanks in advance.

Member Avatar for arpit.mishra
0
154
Member Avatar for vespasianvs

Hi, everyone. I am studying Qt4. I want to write a function that reads from a file and the write to the same file. It is supposed to be simple, but I can't make it through the compiler. Here is my header file: [CODE] #include <QFile> #include <QString> #include <QStringList> …

Member Avatar for vespasianvs
0
726
Member Avatar for anushri

hello!!!everyone..... i want to print all characters from zero to 255 in a file. i am confuse how to distinguise character and integer in c++..(dont make use of printf) i unable to point a pointer to file or can say point a pointer to character and increase it to next …

Member Avatar for mrnutty
0
64
Member Avatar for bernadlosini

hi, i need to use both java and c++ for my project.but i don't know how to set path for both.i use jdk 1.5.6 for java compiler and mingw compiler for C++ .but i am able to use one compiler at a time. is there any option to use both …

Member Avatar for bernadlosini
0
209
Member Avatar for johndoe444

Hi, [CODE] #include <iostream> #include <cstdlib> #include <new> using namespace std; class loc { int longitude, latitude; public: loc() {} loc(int lg, int lt) { longitude = lg; latitude = lt; } void show() { cout << longitude << " "; cout << latitude << "\n"; } }; // Global …

Member Avatar for r.stiltskin
1
157
Member Avatar for damaged

Hi, i'm second year in college and i'm diving into the basics of c++ , basicly i have to read 2 numbers and divide them with each other by repeated substractions using a function, the function is to divide those numbers by repeatedly substracting one from another, and return the …

Member Avatar for damaged
0
133
Member Avatar for ayan2587

hi frnz.. have a bit of trouble here...:( i am allocating a dynamic integer array... after allocation i assign different values to every array element. now what i wish to do is to delete the array and free the memory element by element & not as a whole array at …

Member Avatar for Salem
0
179
Member Avatar for ayesha91

Hey everyone,,, tomorrow is my c++ final,,, and am having a problem with a simple code,,, it seems logical but i do not know why it is not working,,, I wrote two function one that get the length of the string and another to reverse the character in the string,,,, …

Member Avatar for Lerner
0
158

The End.