Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
~12.5K People Reached
Favorite Forums
Favorite Tags
c++ x 40
Member Avatar for seanhunt

Folks, I'm having some trouble with overloading the '<<' operator for a templated class. For example, given a very simple template class like this: [code] template<class T = double> class Real { T m_value; public: Real( T val = 0 ){ m_value = val; } T get() const { return …

Member Avatar for mrnutty
0
132
Member Avatar for nschessnerd

Hey so as i mentioned here [url]http://www.daniweb.com/forums/post840142.html[/url] i need to check if a process is responding by using sendmessage however i have no idea how to get the hwnd because i start the process using system::diagnostics::process [CODE] process->StartInfo->WorkingDirectory=sinfo->workingDirectory; process->StartInfo->Arguments=" -exec "+sinfo->init+" -port "+sinfo->port+" "+sinfo->options; process->StartInfo->FileName = sinfo->exe; process->StartInfo->UseShellExecute=true; [/CODE] so …

Member Avatar for seanhunt
0
962
Member Avatar for tiki_master

I have the following code below which is part of a program to create a Huffman Coding tree. The problem is that it runs through correctly for one node, outputting that character 'l' for a certain file has a specific frequency. However...after going through several iterations, it runs into a …

Member Avatar for seanhunt
0
130
Member Avatar for Klapiii

I'm not good in C++ and I need your help. I have some small program that can automatically play chess in internet chess servers. It needs only the chess engine to play. I play only on [url]www.kurnik.org[/url], but from a few months they changed adress to [url]www.playok.com[/url]. My problem depends …

Member Avatar for Ancient Dragon
0
249
Member Avatar for xcruiser

I have an assignment to submit tomorrow. It gives me compiling errors. About 62 in VC++ 2008 and 42 in VC++ 6. I have written this code in one single file and it works fine there. One error that I can think of is with the declaration of class variable …

Member Avatar for seanhunt
0
1K
Member Avatar for daviddoria

According to this: [url]http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13[/url] One way to keep only the function declaration in the .h file is to do this [code] ////////// file: Tools.h #include <iostream> #include <vector> using namespace std; template <typename T> T Sum(vector<T> &V); [/code] [code] ///////// file: Tools.cpp #include "Tools.h" #include <iostream> #include <vector> using namespace …

Member Avatar for mvmalderen
0
282
Member Avatar for deadmancoder

Hello mates, i am pretty new to this forum.. i am a midrange c++ programmer. if i have to create an IDE in c++ that involves basic drawing tools, what should i learn and where should i start?? is it a big task? can anyone explain me or direct me …

Member Avatar for NicAx64
0
217
Member Avatar for star4ker

I am having trouble with this program which was solved before, but I am still having an issue with the final code. Here is the assignment prompt: Write a program that asks the user to order an ice cream treat. The user selects the type of ice cream, the type …

Member Avatar for seanhunt
0
4K
Member Avatar for anbuninja

so im starting the second half of my c++ class and we are getting into functions. are first assignment and im already stuck -__- the teacher gives us the code for above main so we just need to write the prototypes. heres my code so far (prototypes probably wrong) it …

Member Avatar for vmanes
0
167
Member Avatar for aminpost

i have a class with 10 object and each object have a random position like (x,y) now i wand a code that do not put object in same position please complete my code [CODE] #include <iostream.h> #include <time.h> #include <stdlib.h> class chess{ public : chess(); private : int x; int …

Member Avatar for siddhant3s
0
115
Member Avatar for trebligwong

i have to do this, and my lecturer is such an ass asking us to learn it by ourselves. i have tried a code but it not working the way it is suppose to be. (Airline Reservation System) A small airline has just purchased a computer for its new automated …

Member Avatar for seanhunt
0
300
Member Avatar for jeevsmyd

Hello friends.. I am an amateur programmer in TURBO C++ .. It is a very old version v3.0 ... I am beginner.. I wrote a very simple programme to find the largest ans smallest element in an array . . The largest element finding process is working finely .. I …

Member Avatar for seanhunt
0
397
Member Avatar for ganbree

I'm trying to read a Unicode file using std::wifstream. On wintel. [code=c++] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { wifstream File("input.txt"); wstring Line; while(!File.eof() ) { getline(File, Line); wcout << Line << endl; } system("pause"); return 0; } [/code] And this is my output [code] …

Member Avatar for seanhunt
0
578
Member Avatar for kenji

Hello, I have coded an overloaded += operator and it is giving me trouble. basic function of the operator is to add data to dynamically allocated class array which has 3 member variables. [code=CPLUSPLUS] ie. savings[i].accountNumber; savings[i].balance; savings[i].customer; [/code] I have managed to get the first part of the function …

Member Avatar for Agni
0
118
Member Avatar for pacx

Hi I am using Visual 6 C++ and try to retrieve a member's all closed trades. i declare a string as below: char str[8000]={0}; But this declaration is ok and the program work fine if the member's record size does not exceed 8000bytes. In order to be able to retrieve …

Member Avatar for pacx
0
159
Member Avatar for hebosh88

i want to solve the homework the quation of the home work the game of damca please i want it the day

Member Avatar for seanhunt
-2
99
Member Avatar for Superstar288

hey i have to make a program using win32 c++ and i need to get my hands on some information from the registry which i cannot find. the problem is i need to find information about the graphic card the pc is using and this software has 2 be ported …

Member Avatar for seanhunt
0
89
Member Avatar for sweeya

Hi i have written a code for concatenation of two strings by overloading the string operator. The program works fine but i don't understand the sequence of steps happening. [code][Use language = C++] #include <iostream> using namespace std; class String { int len; char *p; public: String () { cout …

Member Avatar for seanhunt
0
393
Member Avatar for emotionalone

I need to create a Space Invaders kind of game and I have a demo I need to copy the main features from. The invaders have to be of at least 3 different types and they change color. So I figured the invaders are 3 child classes from a parent …

Member Avatar for cikara21
0
207
Member Avatar for CoolGamer48

Does anyone actually use the .hpp file extension for C++ header files? I've never seen it used, but I was just working with geany, and I noticed that it only syntax highlights C++ specific things if the file extension is .hpp (or .cpp, obviously, but not .h). So what's the …

Member Avatar for ArkM
0
134
Member Avatar for Lukezzz

Is there a way to Alt-F4 programatically. It will be used to close another programs window that opens wich is the topmost form on the desktop.

Member Avatar for Lukezzz
0
178
Member Avatar for NinjaLink

Hey, I need help getting this program to run. This is what I'm trying to do. a) set and store the first name only b) set and store the last name only c) store and set the middle name d) check to see if a given first name is the …

Member Avatar for NinjaLink
0
1K
Member Avatar for fireballnelson

I am new to C++ although I have done intermediate java programming. A couple of months ago I bought a book called [I]The C++ Programming Language; Third Edition[/I] by Bjarne Stroustrup. I am beginning to think that was a mistake because it is a little over my head. I was …

Member Avatar for chococrack
0
84
Member Avatar for Dontais

I'm trying to run my program and when I enter say 3 it gives me a fatal error. It is suppose to calculate the avg of each value entered and output it. Would appreciate a little advise on this I'm stumped. The error says "warning C4700: uninitialized local variable 'sum' …

Member Avatar for seanhunt
0
155
Member Avatar for n8thatsme

Ok I have a simple question I have a header file that has the following code [CODE] void setPartDecription(string partDescrip); string getPartDecription() {return partDescription;} [/CODE] Of course I have other functions but these are the problem functions and they are public. In my main function I have this: [CODE] cout …

Member Avatar for seanhunt
0
153
Member Avatar for Frankinator

Suppose I were to use a code in my program very similar to this one: [url]http://www.codeproject.com/KB/IP/ftpclientclass.aspx[/url] What headers would I need to use? The tutorial doesn't state that, I downloaded their sample source codes for the compiler I use (Bloodshed) and none of the multiple example source codes' headers worked …

Member Avatar for Frankinator
0
124
Member Avatar for just11

Q) Draw an inheritance hierarchy for class Quadrilateral, Trapezoid, Parallelogram, Rectangle and square.Use Quadrilateral as the base of the hierarchy. Make the hierarchy as deep as possible. Can anyone help me to create it as a proper program?

Member Avatar for seanhunt
-1
314
Member Avatar for seanhunt

Hi There! Quick, probably dumb question but I have the following snippet [code] template<typename T> class Natural : public ArbitraryNumber{ std::vector<T> mVal; std::vector<T>::iterator mIter; [/code] instantiated with [code] math::Natural<long double> z; [/code] in my main module. Visual C++ dislikes this. When I put this in: [code] typename std::vector<typename T>::iterator mIter; …

Member Avatar for seanhunt
0
123
Member Avatar for tefismp

Someone out there please help me i must do a function for a bucket sort but i dont know how and the only things i must use are normal arrays and pointers no strange functions and libraries i need the code in c++ please i know what the program does …

Member Avatar for Freaky_Chris
0
160
Member Avatar for Evan M

As I was busy inlining some of my functions, I was wondering if it is really necessary to inline anything. Doesn't the compiler automatically inline stuff, or do I have false memories? And if the compiler does inline stuff for me, would it be best to let it do its …

Member Avatar for Evan M
0
130