Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
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
~13.0K People Reached
Favorite Forums
Favorite Tags
c++ x 40

32 Posted Topics

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
134
Member Avatar for nschessnerd

I'm not a .NET programmer but according to the documentation: [code] IntPtr hwnd = process->Handle; [/code] Which compiles successfully as a CLR console program.

Member Avatar for seanhunt
0
1K
Member Avatar for tiki_master

First, using the same name for an argument and a global is confusing (string encoding)...if you are using it as a constant, make sure you initialize it (not all compilers will do this for you, especially in release), and remove the argument from the method declaration and definition. I don't …

Member Avatar for seanhunt
0
136
Member Avatar for Klapiii

Actually, since it appears that the program scans the chessboard visually you should be able to adapt it to the 'new' chessboard layout. It's really just a matter of changing it so that it recognizes the new board and pieces. It looks like the original compiler was CBuilder; you will …

Member Avatar for Ancient Dragon
0
263
Member Avatar for xcruiser

Global variables are defined in a header file (so that various cpp files that include it can see it). Setw is defined in iomanip so this must be included where needed. Also, you are trying to use an array of your class in the implementation (student) without declaring it or …

Member Avatar for seanhunt
0
1K
Member Avatar for daviddoria

[QUOTE=daviddoria;830897]yup, its txx. see section C.5 in this document: [url]http://public.kitware.com/vxl/doc/development/books/core/book_15.html#SEC158[/url][/QUOTE] I've seen .txx, or variants thereof, it is for compiled template files. Usually the contents of these are various things that need to be compiled to use a given template library, such as type-specific implementations of parts of the library, …

Member Avatar for tux4life
0
294
Member Avatar for deadmancoder

[QUOTE=deadmancoder;826987]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
223
Member Avatar for star4ker

[QUOTE=star4ker;826328]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

the second example would work, assuming that you declare: [code] void getHours(int& input1, string& s); [/code] at the top and the definition is: [code] void getHours(int& input1, string& s) { cout << s; cin >> input1; } [/code]

Member Avatar for vmanes
0
173
Member Avatar for aminpost
Member Avatar for siddhant3s
0
122
Member Avatar for trebligwong

Okay, examine the first loop statement: [code] while(n >= n) [/code] is an obvious first problem...a variable is *always* going to be equal to itself under any competent compiler. Thanx... Sean

Member Avatar for seanhunt
0
316
Member Avatar for jeevsmyd

What you've got works, since the if/else loop code is actually only a single statement. I would recommend, however, that you include brackets for clarity and ease of maintenance; it doesn't cost anything and it can lead to errors that can be quite difficult to identify (like the error that …

Member Avatar for seanhunt
0
402
Member Avatar for ganbree

[QUOTE=ganbree;804699]I'm trying to read a Unicode file using std::wifstream. On wintel. [code=cplusplus] #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
584
Member Avatar for kenji

[QUOTE=kenji;784263]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
122
Member Avatar for pacx

[QUOTE=pacx;784648]hi my application allow only native dlls.. i cant seem to use string to solve my problem..[/QUOTE] if for some reason you cant use stl, you coulc have buffers that hold up to a set amount;in other words keep a large buffer aside that holds, say 4000 characters, as soon …

Member Avatar for pacx
0
168
Member Avatar for hebosh88

First, this is not a place for us to write your homework for you. If you have specific questions regarding C++ please post what you have written and what is not working, and we will try to help. There is now way we ca we work 'please do my homework …

Member Avatar for seanhunt
-2
103
Member Avatar for Superstar288

Is there a specific reason you need this from the registry? Graphics packages include this ability, as well as the ability to enumerate the different cards on a machine if there are multiple. It's much more specific info. DirectX does it, I believe that GDI+ has it, OpenGl, etc... Thanx... …

Member Avatar for seanhunt
0
92
Member Avatar for sweeya

in the call to the operator+ you use String temp; which invokes the default constructor. Thanx, Sean

Member Avatar for seanhunt
0
397
Member Avatar for emotionalone

The Standard Template Library has a dynamically sizable array type, a linked list type, and generally a whole bunch of useful stuff that makes this easy, called the STL. The problem with STL is that it can be a bit confusing to people familiar with only C or new to …

Member Avatar for cikara21
0
227
Member Avatar for CoolGamer48
Re: hpp?

It's a bit unusual, but is one of the extensions usable for C++ header files.

Member Avatar for ArkM
0
139
Member Avatar for Lukezzz

[QUOTE=Lukezzz;740072]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.[/QUOTE] This is not really a standardized thing, in my knowledge. For many reasons, it is usually a pretty involved platform specific thing, as terminating …

Member Avatar for Lukezzz
0
189
Member Avatar for NinjaLink

[QUOTE=NinjaLink;723609]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

[QUOTE=fireballnelson;721520]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
86
Member Avatar for Dontais

[QUOTE=Dontais;723659]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
164
Member Avatar for n8thatsme

[QUOTE=n8thatsme;723634]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
164
Member Avatar for Frankinator

[QUOTE=Frankinator;723697]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
129
Member Avatar for just11

[QUOTE=just11;721147]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?[/QUOTE] Well you have the base class already: Quafrilateral. That goes on top. …

Member Avatar for seanhunt
-1
320
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
127
Member Avatar for tefismp

[QUOTE=tefismp;718426]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
164
Member Avatar for Evan M

The function definition is not being included in your test.cpp module, so the linker can't find it. Often inline function definitions are saved as a different type of file (like test.inl) which is itself #include -ed. if you really need to inline something and aren't sure whether the compiler will …

Member Avatar for Evan M
0
135
Member Avatar for kenji

This is actually C, not technically C++, btw. You mention pointer to member functions but so far all I see is a standard function declaration and definiton. No function pointers...could you clarify? Function pointers are a standard way to deal with "callbacks", that is, they hold the address of a …

Member Avatar for seanhunt
0
157
Member Avatar for Jason123

[QUOTE=Jason123;718419]i have a 2D array of emp[20][10] How can i do it such that it only prints out the selected index like emp[0][0] to emp[0][10] etc. It will print around more than the selected.. [code=cplusplus] for(int i= 0; i < 20; i++) { for (int j = 0; j < …

Member Avatar for seanhunt
0
100

The End.