49,755 Topics

Member Avatar for
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
272
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
271
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
94
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
82
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
109
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
197
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
153
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
719
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
198
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
155
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
178
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
Member Avatar for SasseMan

Hi! I am having some problems with using the operator= on an dereferences object. I have the code... [CODE]Julian j1(2319,1,7); Date * dp = new Gregorian(2319,1,23); cout << (*dp) << " " << typeid(*dp).name() << endl; *dp = j1; cout << (*dp) << " " << typeid(*dp).name() << endl; j1 …

Member Avatar for SasseMan
0
96
Member Avatar for anakondaksa

I want to develop this program through the arrays to work on more than how Server؟ [CODE] /////////////////////////////////////////////////// /// Program For Simulation 2 server in 2 line //// /// Create By :Anakonda-ksa //// //////////////////////////////////////////////// #include<iostream.h> #include<stdlib.h> #include<cstring.h> int main() { int na=0 ,nb=0; float time=0,total_time,no_of_completion_a=0,no_of_completionb=0, total_area_a=0,event_time_a,total_busy_time_a=0,total_area_b=0,event_time_b,total_busy_time_b=0, Ra,Rb,Xa,Xb,Ua,Ub,Na,Nb,prev_event_time_a,prev_event_time_b; string event_type; { …

Member Avatar for jonsca
0
85
Member Avatar for safenaa

i want to know how make dequeue in queue . please, the answer with a complete program. thanks,,,,,,,,,,,,,,,,,,,

Member Avatar for jonsca
0
39
Member Avatar for BazookaJo

Hi guys, first of all let me say that I'm a Delphi guys, but I've been cleaning up some old legacy C++ code without any real issues. The following piece of code however baffles me! It looks like it simply copies the binary input file to another file bit by …

Member Avatar for BazookaJo
0
156
Member Avatar for Silvershaft

I've written a DLL with keyboard hook inside, how do I load the dll in my code and like activate it, the hook function inside dll writes keyboard presses to a file, I would like to activate it from my exe.

Member Avatar for Silvershaft
0
140
Member Avatar for new programer

Hi, How can I create a program that detectes plagarism lets say we have two files and we want to compare them and at last to have the percentage of smilarity I am aware of strcmp and compare and I know how to use them it's just the methodology that …

Member Avatar for Salem
0
112
Member Avatar for fadia

Heey guys... I'm in a rush.. I don't know how to write on definition of a function here. Please help. The function interval_since is supposed to compute the time. The previous time and the current. I'm confused how to write the definition. Here is my code.. and the very last …

Member Avatar for Salem
-3
110
Member Avatar for _Michael_

Hello, I am making a console application for a window home computer. The application will search for factors of a number that the user enters. Everything works fine up to about [10^10 = 10000000000]. I am unsure if C++ has a maxium number allowence. If this is the case can …

Member Avatar for WaltP
0
125

The End.