2,045 Posted Topics

Member Avatar for Danny1994

Are you looking for a specific ordering like 000-111-2222 ? If that's the case you might want to try a masked text box. There is a current thread in C# on this ([url]http://www.daniweb.com/forums/post1440491.html#post1440491[/url]) (I know it's not the right language, but it's the same .NET library, so you'd just have …

Member Avatar for Danny1994
0
329
Member Avatar for trickx

[QUOTE=subtracktor]I hope this will help you [/QUOTE] No, in fact you've hurt his/her chances of learning from this because you've done it for him/her.

Member Avatar for subtracktor
0
134
Member Avatar for Ahna

If you are on a different platform than he is (Linux vs. Windows) you're going to have to compile his code on a Windows machine. He could conceivably generate a Windows binary, but it's not the default and it's probably too much trouble at this point. have him send you …

Member Avatar for Ahna
0
121
Member Avatar for imolorhe

It might be helpful if you gave a brief snippet of what you are trying to do.

Member Avatar for mrnutty
0
532
Member Avatar for adit_kr

On the left hand side of your post (the post in question, not this one), underneath your name, hit the "Flag Bad Post" button and explain your situation to a moderator.

Member Avatar for happygeek
0
44
Member Avatar for somshridhar
Member Avatar for jonsca
0
253
Member Avatar for divyasphoorthy

Some think that it translates from the ancient phrase meaning "for the love of all things good, get a book on C!" (and before you judge Jonsca, this is the 4th (my fact checkers say) such request from this OP)

Member Avatar for jonsca
0
48
Member Avatar for Martje

[QUOTE=group256]Man, I'm sorry but, do you really expect us to answer your question?[/QUOTE] The poster has not explicitly specified that he/she is using C++/CLI and .NET, but this is a perfectly understandable question. It's good that you're concerned about post quality, though. @OP: Set [icode] pictureBox1->BackgroundImage = nullptr; [/icode]

Member Avatar for Martje
0
94
Member Avatar for MasterGberry

If you are using C++/CLI like you were, a String ^ has an identical ->Split method to the one in C# (since it's all .NET). I think it requires a cli::array<String ^> to accept the pieces. I suppose you could use a stringstream, but you'd have to convert your String …

Member Avatar for MasterGberry
0
2K
Member Avatar for mehdi_nikdel
Member Avatar for chethakau

You have to translate this code from nobugz in this post from C# into C++/CLI [url]http://social.msdn.microsoft.com/forums/en-US/winforms/thread/60b2493d-c8ff-495d-b845-d114fe456f54/[/url] I'm taking a shot at it, but see what you can come up with from there.

Member Avatar for jonsca
0
242
Member Avatar for pxd1055

There's nothing technically wrong with using printf, but there are ways to accomplish the same thing using cout. In particular, look at the examples: http://www.cplusplus.com/reference/iostream/manipulators/fixed/ http://www.cplusplus.com/reference/iostream/manipulators/setprecision/ It looks to me like your assignment is saying all you need to do is output the number of each of the bills and …

Member Avatar for jonsca
0
339
Member Avatar for jackmaverick1
Member Avatar for mrectek
Member Avatar for AmerJamil

Check out [url]http://www.cplusplus.com/reference/iostream/manipulators/setprecision/[/url] , in particular the example.

Member Avatar for frogboy77
0
148
Member Avatar for petmol

Why does your function on 324 return float? You are using doubles in the body of the function and then trying to cram the double (with it's additional precision back into the float). This is a warning from the compiler but it should be addressed. Change line 30 to [icode] …

Member Avatar for pranaymahajan
0
141
Member Avatar for stevanity

You're going to have to use either a char or an int array to hold the numbers. [code] ex 1234 => |1|2|3|4| [/code] You'll have to write a procedure to do the multiplication and division digit by digit Or if you can use a library, there's [URL="http://gmplib.org/"]GMP[/URL] or MPIR if …

Member Avatar for stevanity
0
125
Member Avatar for alonewolf23

Since your numbers are integers, you need an integer parameter for your function. Have it return a std::string.

Member Avatar for jonsca
0
841
Member Avatar for MasterGberry

You need to either explicitly have a using statement for [icode] System::Collections::Generic [/icode] or qualify it as [icode] Generic::IEnumberable<Item ^> [/icode] You're not going to be able to use a std::vector without a lot of hassles. Change it to the cli::array that it's asking for. Google for the syntax. Also, …

Member Avatar for MasterGberry
0
881
Member Avatar for messengerman

I would use getline() to read in each line as a std::string. When it comes to those lines which are variable, read the string into a stringstream and use the >> extraction operator to pull out what you need. That way you can compare each line with "----------" to see …

Member Avatar for jonsca
0
286
Member Avatar for ethanbuckley

Take out the .h, that's the filename, you want to instantiate an object of type Form1. [icode] Application::Run(gcnew Form1()); [/icode]

Member Avatar for jonsca
0
121
Member Avatar for ethanbuckley

Post some of the surrounding code for this one. You're trying to initialize something within a class declaration or struct.

Member Avatar for jonsca
0
162
Member Avatar for MasterGberry

Line 79 of your first listing you have a semicolon after the if statement. Also, remember than in C++/CLI the . operator of C# can translate to a namespace or a member function. (so either a :: or a -> or even a . for a non-pointer) But, AD is …

Member Avatar for MasterGberry
0
251
Member Avatar for MasterGberry

Check and make sure he has the redistributables (e.g., [url]http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en[/url]). He may also need the 2005 or 2008 ones for any older dlls, check and see if the 2010 ones supersede those in the 2005 and 2008 redistributables.

Member Avatar for MasterGberry
0
77
Member Avatar for alex-VX

At least post the order of your headers at the top of your code. Is a header you wrote listed ahead of some of the standard ones? If so, you may be missing a ; after one of your class declarations.

Member Avatar for jonsca
0
478
Member Avatar for Juginx

What type of videos (mp4, flv, etc) are they? You're probably going to need to use a Windows Media Player control [url]http://msdn.microsoft.com/en-us/library/dd564582(VS.85).aspx[/url] or another API appropriate for your video type.

Member Avatar for Juginx
0
126
Member Avatar for ethanbuckley

Don't type in your event handlers by hand, the IDE provides a mechanism. If you really want to do it by yourself, let the IDE do one and watch where it places the code. Go to the form designer, select your form. On the right hand side there is a …

Member Avatar for jonsca
0
250
Member Avatar for goldman480

You do not need the datatypes when you make the calls in main() on lines 68 and 69, that is what the compiler is choking on. However, there is no need to pass the object into itself, as it already has access to the members and methods.

Member Avatar for jonsca
0
168
Member Avatar for icasta13

[quote=chiwawa10]I don't think you can read int from the file using ifstream. [/quote] Did you try it? You certainly can. [QUOTE=Saith]Glad you got the answer :D I would suggest you use the following whenever you use a file for data. It may help with an immediate solution that would otherwise …

Member Avatar for icasta13
0
219
Member Avatar for pie555

Which compiler are you using? They do have a makefile for VC++ version 10. If you have cygwin, etc. you can use the build instructions for *nix.

Member Avatar for pie555
0
2K
Member Avatar for jlianne
Member Avatar for jlianne18
0
158
Member Avatar for june 200090

[quote] Test 1 25 % Test 2 25 % Test 3 25 % Final 50 % [/quote] adds up to 125%. I think one of your numbers is off.

Member Avatar for june 200090
0
174
Member Avatar for jackmaverick1

If you're talking about making a Windows Forms application, see [url]http://www.functionx.com/vccli/index.htm[/url] for an intro to the malevolent world of C++/CLI. If you are after MFC (only available in the full version of VS) google for tutorials on that. If you want to do things at a more fundamental level (Win32 …

Member Avatar for jackmaverick1
0
145
Member Avatar for ac.morgan

[quote]My first problem is what is a switch statement and what does it do in this program? Why is there a break after each case (I know it changes the flow of control of the program but I am not clear how it changes it). What does cout << ..; …

Member Avatar for Narue
0
120
Member Avatar for GRENDY

Before I look at this at all, you need some formatting lessons. Please, please take a look at [url]http://www.gidnetwork.com/b-38.html[/url]. At least you got it into code tags, but no one can read what you have above, with everything jammed onto one line. Please repost it with proper formatting. main should …

Member Avatar for chikkupa
-1
223
Member Avatar for ethanbuckley

[quote][code]Handles panel1::MouseDown XP = MousePosition.X - this->Location.X YP == MousePosition.Y - this->Location.Y;[/code][/quote] What are you trying to do with this line? It doesn't make much sense to me. [quote][code]Button3_Click(ByVal sender As System::Object, ByVal e As System::EventArgs);[/code][/quote] This looks a lot like VB.NET to me. The languages can interop on an …

Member Avatar for jonsca
0
436
Member Avatar for Plumpkin

Take a look at this page: [url]http://www.cplusplus.com/reference/iostream/manipulators/fixed/[/url]

Member Avatar for jonsca
0
71
Member Avatar for sivakumar.k

Do you have an Express Edition of Visual C++? If so, you are probably trying to compile an MFC program with it, and you need the full version of Visual Studio for that. EDIT: Edged out by AD by a hair

Member Avatar for sivakumar.k
0
449
Member Avatar for jimJohnson

I don't want to speak for anyone else, but rather than having someone do an entire walkthrough of your code, you could pick out sections that are problematic, and post those. Someone is much more inclined to wade through 20-50 lines rather than a few hundred. If you have large …

Member Avatar for Narue
0
92
Member Avatar for NeilA

Head First C# is a great introductory text that is very "active" and engaging (for people of any age group). There's a new edition for C# 4.0. There's not a lot of depth to it, but it covers a large chunk of the language and has some fun labs.

Member Avatar for jonsca
0
180
Member Avatar for linova

[quote]I think I haven't stepped through each character at all.[/quote] You would have to in order to get the frequency information.

Member Avatar for WaltP
0
252
Member Avatar for bensewards

To make your code neater you can hit enter(just not in the middle of your strings), like: [code] cout<<"According to my calculations...if you were to buy..." <<userinput[0]<<" cars for $" <<userinput[1]; [/code] as the compiler will get rid of the whitespace. The nice thing about cout is that you can …

Member Avatar for jonsca
0
210
Member Avatar for alexchen

When i and j are 0, index = -width, which is incorrect. For the row 1 (the second row) you want width*1 + j (offset of 1 row + the column offset).

Member Avatar for alexchen
0
109
Member Avatar for Juginx

My impression of XML was that it has the angle brackets <> instead of square brackets []. Perhaps you can do a global search and replace on your document before you process it. There are a host of methods under the System::Xml namespace (see [url]http://msdn.microsoft.com/en-us/library/system.xml.xmltextreader(v=VS.100).aspx[/url]) where you can extract the …

Member Avatar for jonsca
0
87
Member Avatar for Juginx

Use a streamreader for the first one, a streamwriter for the second. [code] StreamReader ^ sr = gcnew StreamReader(filename); String ^ temp; while(temp = sr->ReadLine()) listBox1->Items->Add(temp); [/code]

Member Avatar for jonsca
0
637
Member Avatar for mixmagz

There's NO NEED TO TYPE IN CAPS. We can hear you just fine. If you are working in C, this should probably be moved over there. I'll flag it for a mod.

Member Avatar for mixmagz
0
154
Member Avatar for J0shu

The compiler is not generating a default constructor for your struct. I'm not absolutely sure why, so I won't speculate and steer you in the wrong direction. Where does Point come from?

Member Avatar for jonsca
0
560
Member Avatar for Me-Mo

I'm not a board-certified psychiatrist, but I'm fairly sure that's not the case. I think he suffers from CDH, can't do homework. Just as a PSA: The more your title cries out for attention, the less attention it will get. The more intelligently written your title is, the more help …

Member Avatar for Tellalca
-3
149
Member Avatar for salvador01

Would it help you to know that subtracting '0' from '1' though '9' gives you the integer value of that character? '1' - '0' = 1 '2' - '0' = 2 etc.

Member Avatar for prvnkmr194
0
113
Member Avatar for shri007
Member Avatar for Nick Evan
0
126

The End.