Posts
 
Reputation
Joined
Last Seen
Ranked #140
Strength to Increase Rep
+10
Strength to Decrease Rep
-2
99% Quality Score
Upvotes Received
83
Posts with Upvotes
69
Upvoting Members
42
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
42 Commented Posts
~156.04K People Reached
Favorite Tags
Member Avatar for judithSampathwa

> how can i avoid the 0 z in the value that is being displayed. You cannot. This is a limitation of the MaskedTextBox. Edward usually uses a regular TextBox and manages the format manually. For example, just a straight validation is super easy. [code] private void textBox1_Validating(object sender, CancelEventArgs …

Member Avatar for Renathu
0
7K
Member Avatar for rythreion

> convert any number that the user will enter and convert it in any base that the user will enter It is harder than you think. Converting to a base means knowing the alphabet of that base and using any special logic for generating values in that base. Functions like …

Member Avatar for NathanOliver
0
4K
Member Avatar for Narue

That's why Edward puts as much code as possible in namespaces. Compilers are bad about including all kinds of unexpected stuff in the standard headers, so even if you don't include unistd.h yourself, iostream or another standard header might do it for you and create a name conflict.

Member Avatar for Smn
18
13K
Member Avatar for kimbula...

Sink the KeyDown event for the text box and you can cancel key presses if the character typed is not a digit. In fact, the documentation example for [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keydown.aspx"]Control.KeyDown[/URL] does exactly what you want.

Member Avatar for kplcjl
0
5K
Member Avatar for savinki

> That is not the best way to do it There's no such thing as the best overall way to do it. Your way might be better in Edward's program but worse in jephthah's, or vice versa. Though jephthah's function has the benefit of simplicity. :) > heres a better …

Member Avatar for Shahzad Ahmad
0
298
Member Avatar for CoolGamer48

[QUOTE=agdastidar;614505] [code]4) C/C++ doesn't exist[/code] This sentence do not have any meaning!!!!! Clarify.[/QUOTE] The logic is that C is a programming language and C++ is a programming language, but C/C++ is a misunderstanding of the difference between C and C++. Edward thinks this is just the language snobs being snobbish, …

Member Avatar for stultuske
0
897
Member Avatar for plike922

EOF doesn't have an ASCII value, it's required to be negative: [code=c] #include <stdio.h> int main() { printf("%d\n", EOF); return 0; } [/code]

Member Avatar for I_m_rude
0
514
Member Avatar for rayy

Get and set functions are just a public interface for getting read/write access to private data members: [code] #include <iostream> class EdRules { bool _isEdAwesome; public: EdRules(): _isEdAwesome(true) {} // Get function, gives read access to _isEdAwesome bool IsEdAwesome() const { return _isEdAwesome; } // Set function, gives write access …

Member Avatar for promod
0
113
Member Avatar for literal

[B]Accelerated C++[/B] is the most recommended first book on C++ because it teaches C++ the way it will ultimately be used. All of the beginner books before it taught C with iostreams. ;) Edward reviewed [B]You Can Do It![/B] and was a little disappointed. The most useful part of the …

Member Avatar for snuffleupagus
0
279
Member Avatar for deean

Can you give an example of what you need to do? There are tons of ways to do what you want, but it depends on where in the XML you're searching and how you want to search. Do you want a full application that lets you do this, a search …

Member Avatar for m.asfak
0
132
Member Avatar for jamesbondbest

Your code has too many problems for Ed to cover in detail right now, so here is a simple function that works using the library functions strcspn, strspn, and printf for any heavy lifting. If you cannot use strcspn or strspn, the problem can be broken down into the tasks …

Member Avatar for Ancient Dragon
0
79
Member Avatar for tomtetlaw

Do all functions from stdlib.lib give you a linker error? On a side note, Ed does not get warm and fuzzies from the name "stdlib.lib" because there is already a compiler-supported stdlib.h, which might have a corresponding stdlib.lib.

Member Avatar for mitrmkar
0
168
Member Avatar for sidrules1984

system() returns an integer, but popen()'s first argument expects a string. What should be done depends on what you want to happen, but Ed would guess this: [code] ptr = popen(command, "r"); [/code]

Member Avatar for Radical Edward
0
78
Member Avatar for 7h3.doctorat3

> I have done a little of it so far and it is correct up to this point This is true. It is very hard to get array declarations and a prompt for input wrong. :D Ed is inclined to believe that you accidentally pasted only a portion of your …

Member Avatar for prvnkmr449
0
766
Member Avatar for daviddoria

> So should accessor functions always return const? Accessors should be const methods at the very least, because the object state isn't changed in the body: [code] double Point::getX() const { return x_; } [/code] That should clear up the error without forcing you to make the return value const. …

Member Avatar for daviddoria
0
189
Member Avatar for majestic0110

> I heard that some anime was available for free (and more importantly legally) as a download for promotional purposes You can download fansubbed anime, and if it hasn't been licensed for sale in your language/country then it's only illegal in the "we won't come and get you" kind of …

Member Avatar for Kusanagi03
0
348
Member Avatar for monstercameron

A "plain english" language was tried with COBOL. It didn't really work out. ;) The problems are verbosity and precision. Coming up with a precise grammar for the language makes it harder to understand than simple prose, and any language based on spoken languages will be much more verbose than …

Member Avatar for 0x69
0
256
Member Avatar for Chaos3737
Member Avatar for arkoenig
0
137
Member Avatar for indu_k
Member Avatar for abbyo
0
174
Member Avatar for judithSampathwa

On the local network you can just open a connection to the destination server directly. Distributed programming techniques are not necessary beyond possibly a UNC path or two. :)

Member Avatar for judithSampathwa
0
122
Member Avatar for bubacke

> isnt there a more elegant way? Right now, [URL="http://beta.boost.org/doc/libs/1_35_0/libs/assign/doc/index.html"]Boost::assign[/URL] makes it more elegant. [code] #include <boost/assign.hpp> #include <iostream> #include <string> #include <vector> using namespace std; using namespace boost::assign; int main() { vector<string> vec; vec += "this", "is", "my", "array"; for (vector<string>::size_type i = 0; i < vec.size(); ++i) cout …

Member Avatar for bubacke
0
190
Member Avatar for memstick

C++ uses the :: operator for scope resolution. [code] using namespace System::Windows::Forms; [/code]

Member Avatar for memstick
0
120
Member Avatar for Zinderin

> doesn't the first example make the cp object global? Perhaps it could be described as global within the frmMain class. > I don't really want it (or need it) to be global. You might not want it to be, but you *do* need it to be if more than …

Member Avatar for Zinderin
0
150
Member Avatar for n30h4x

The two programs are running as separate processes, so you need to use [URL="http://en.wikipedia.org/wiki/Inter-process_communication"]IPC[/URL].

Member Avatar for n30h4x
0
198
Member Avatar for noobuser

If either method is faster, it will be memset(). memset() is a compiler provided function, and it might use tricks to run as fast as possible on the target platform.

Member Avatar for Ancient Dragon
0
197
Member Avatar for iamcreasy

The ignore() method will flush cin, but it is better not to need to flush by always reading whole lines. :) Boost's lexical_cast<> makes it easy. [code] string teacherName; int teacherID; string line; cout << "Enter ID: "; getline(cin, line); teacherID = lexical_cast<int>(line); cout << "Enter Name: "; getline(cin, teacherName); …

Member Avatar for Bench
0
435
Member Avatar for Niner710
Member Avatar for NathanOliver

> In my code I just wrote one for numbers. Good news! The NumberConverter actually works for any type with an overloaded << operator. Beyond recommending more of the STL and Boost, Edward approves of your code. ;)

Member Avatar for Bench
0
126
Member Avatar for KAY111

Too many parentheses, says Ed. ;) Look at the expansion of the macro and you will see something like the following. [code] (for (<init>; <condition>; <increment>)) { <body> } [/code] Control flow statements are not expressions that can be wrapped in parentheses.

Member Avatar for Taywin
0
2K
Member Avatar for bbman

C++ does not have properties like C#. You can use methods though. [code] class Example { public: int parameter() const { return param; } void parameter(int value) { param = value; } private: int param; }; [/code] [code] Example text; text.parameter(value); cout << text.parameter() << '\n'; [/code]

Member Avatar for Fbody
0
121