2,045 Posted Topics

Member Avatar for timb89

Your distance is not being shown on the screen because you don't include it in the cout statment. An extra newline character in your text file is the culprit. Put the cursor at the end of the last line and hit delete (not backspace). I had thought that it was …

Member Avatar for timb89
0
122
Member Avatar for lotrsimp12345
Member Avatar for nu2cpp

You need to turn your struct into a managed one, otherwise you'll have to marshal it back and forth and that will give you a headache (if you have to do it per requirement search for the class Marshal on MSDN). So something like: [code] value struct cal { String^ …

Member Avatar for jonsca
0
209
Member Avatar for maryam ahmad
Re: pow

Changing the -1 to a -1.0 should do the trick. There is no overload of that function that takes an integer for the first argument.

Member Avatar for Fbody
0
155
Member Avatar for Veneficae

I think what you need is a static method within Program to write out some text on demand. [code] class Program { static void Main(string[] args) { Display(); //display your outside message Store(); //display your store's wares LeaveStore(); //up to you to implement Display(); //display outside message again } public …

Member Avatar for Veneficae
0
527
Member Avatar for donny008

@David I understand your desire to help, but is it necessary to bump 6-8 arguably "junk" threads in a row from 20 days ago when there is a 99% chance that the OP is long gone??

Member Avatar for daviddoria
0
60
Member Avatar for Rhap

Rearrange it like this: [code] array<char> ^ sum = gcnew array<char>(text1->Length); //you may have missed the ^ above //in the loop { sum[i] = a; } ///// String ^ textout; for(int i = 0;i<text1->Length;i++) textout += sum[i]+ " "; TxtSum->Text = textout; [/code] When not specified the ToString() method of …

Member Avatar for Rhap
0
287
Member Avatar for riotburn

Change [icode]i=0[/icode] on line 37 to [icode]i>=0[/icode] (i=0 resolves to false so your loop condition is false and the for loop is skipped) Also, what's the index of the last element of your string ([icode] reverse1.size()[/icode] would go one past the end)?

Member Avatar for riotburn
0
328
Member Avatar for JameB

[quote] I am not sure if that made any sense.. [/quote] Not really, unfortunately. Give us a few of the categories you could place it into and then we might have a better idea. [quote]It sounds like a Morse code program. [/quote] Not a bad response. Judges?

Member Avatar for Nick Evan
0
107
Member Avatar for tinanewtonart

Thanks for elaborating on your question. You need to step back from this and consider the design aspects. Deck should contain an array of card objects. In the constructor for deck you can simply use a loop to deal the cards into your deck (since you are going to shuffle …

Member Avatar for kvprajapati
0
6K
Member Avatar for mebob

[URL="http://www.exploringbinary.com/how-to-install-and-run-gmp-on-windows-using-mpir/"]This is a great tutorial[/URL] on how to do it with MPIR which I believe has identical syntax, and using VS (the author of that blog posts here sometimes, I believe). If you want to compile it using MinGW you probably need to have something like MSYS or Cygwin (can't …

Member Avatar for mebob
0
94
Member Avatar for daviddoria

I understand what you are getting at. I agree that sometimes people dump off yards and yards of code when it's not always necessary. However, I think asking for the smallest and yet compilable code can bring about a Heisenberg-like effect. The more the OP takes out the trickier it …

Member Avatar for Ketsuekiame
0
90
Member Avatar for gigimcmahan

Grab the .h and the associated .cpp file from here [url]http://mathbits.com/mathbits/compsci/download.htm[/url]. Make the .cpp file a part of your project. Google is your friend...

Member Avatar for iamthwee
-2
128
Member Avatar for shiftingspanner

Because of how the ArrayList stores objects (as objects of type Object ^) you need to cast your ArrayList member before it will give up it's public properties and methods. [code] ReturnString = (static_cast<PulldownArray^>(PulldownTABLE[0]))->Description; //Consider the List instead, no need to cast List<PulldownArray^> ^ pdtl = gcnew List<PulldownArray^>(); String ^ …

Member Avatar for jonsca
0
355
Member Avatar for 3cats

I just responded to your other post (I had figured you had marked it as solved and changed your mind, I didn't know you had started a new one) with a concern about your aver_h in your AverHigh function.

Member Avatar for 3cats
0
136
Member Avatar for BLKelsey

You set countdown = 5 and when it hits the for loop, the condition is already false (5<5) so it skips the loop completely. EDIT: Beaten by a hair ^^^^^^^ P.S. Kicking up the warning level on your compiler (so using a -Wall switch with g++ or a /W4 with …

Member Avatar for mitrmkar
0
103
Member Avatar for Rashakil Fol

[QUOTE=jwenting;1210711]And the money machine is already working. There's going to be a "new" version released soon, which will be identical except it's 6 minutes longer. And no doubt the crowds will once again flock to the cinemas and DVD stores to buy that one too even though they already have …

Member Avatar for Diamonddrake
1
323
Member Avatar for prototyppe

Can you ballpark a region where it crashes? If you have a debugger see where it crashes or put in some cout statements in strategic spots to note the progress. Then I (or someone else) can take a look at that specific spot.

Member Avatar for prototyppe
0
134
Member Avatar for 3cats

You are missing the datatype for [iCODE]m_t[][/iCODE] in your function definition. You are passing [iCODE]m[t][/iCODE] into your functions in [iCODE]main()[/iCODE] improperly, you do not need the []. Take a look at line 51 versus other times you have used a 2D array. If you want to keep [iCODE]m_t[/iCODE] as 1D …

Member Avatar for jonsca
0
193
Member Avatar for mmgoicochea

<Delete> Sorry I was looking at the dimensions of the wrong array. Discussion seems to be continuing at the OP's other thread on this.

Member Avatar for trillionaire
0
116
Member Avatar for coding101

Keep a counter when you are reading in each of the files and use that number to dynamically allocate the array (using new).

Member Avatar for mrnutty
0
104
Member Avatar for SpyrosMet
Member Avatar for new2programming

I know zero about SDL but do you have all of the directories set up properly? The includes go under the Project/"YourProject"Properties/ConfigurationProperties/C-C++/AdditonalIncludeDirectories You'll also need to put the libs directories under the Linker/AdditionalLibraryDirectories of that same Config Properties menu (and the names of the libs under the Linker/Input/AdditionalDependencies))

Member Avatar for new2programming
0
916
Member Avatar for Rhap

[quote]System.Drawing[/quote] The ones with the periods are the C# libraries System::Drawing is correct. Can you post your point.h? If it is an unmanaged class (i.e. is not a ref or value class) you will probably not be able to incorporate the managed code (the .NET Color portion) with the unmanaged …

Member Avatar for jonsca
0
237
Member Avatar for coded_hitec

[quote] WTF [/quote] Read the comment. He had tacked this onto another thread. It was assessed in that thread and after that it was split off by a moderator.

Member Avatar for coded_hitec
0
111
Member Avatar for mickmos

You need to implement a ToString() method in your gun class (or any other that you want to display). You can declare it inline in the public section of the header for your class: [code] virtual String ^ ToString() override { return name; } [/code] change name to whatever member …

Member Avatar for mickmos
0
314
Member Avatar for shrutinr

Include "Form2.h" (change to the appropriate name in your code). Create a load method for Form1 and put [code] Form2 ^ form2 = gcnew Form2(); form2->Show(); [/code]

Member Avatar for shrutinr
0
121
Member Avatar for gregarion

I think there's some confusion in terminology is all. I believe when the OP said "template main" he literally meant code his instructor had given him to use as a model to follow (not in the sense of generic programming). Did you get this resolved, OP, after that detour? The …

Member Avatar for jonsca
0
121
Member Avatar for react05

[QUOTE=chary8088;1186603][CODE] srand(time(NULL)); //seed int lino = rand(); //rand number [/CODE][/QUOTE] To use these functions you must [icode] #include <cstdlib> [/icode]

Member Avatar for alex034
0
99
Member Avatar for metroidfreak

Make table a private member of your class. Use a "setter" method that takes in the value, applies the hash function and puts it in the proper cell of the array. ADs point is valid and important as not all inputs to your hash function will hash uniquely, causing collisions …

Member Avatar for metroidfreak
0
181
Member Avatar for prodstar

Save the Excel file out as a CSV file and read it in like any other text file (with ifstream, etc.).

Member Avatar for gabryprof
0
184
Member Avatar for 9122080

Try looking [URL="http://www.daniweb.com/forums/announcement8-2.html"]here[/URL]

Member Avatar for niyasc
-5
244
Member Avatar for VERMUNDr

Simply pass the array in as [icode] matrix [/icode] each time without any of the brackets. You've already designated that the function is taking an argument that's a matrix with 2 dimensions in the prototype and definition. When it comes to the definition of the function, the array being passed …

Member Avatar for Robert1995
0
181
Member Avatar for prodstar

Use your >> statement to drive the loop: [code] while(weightcategory<7 && charge >>shippingcharges[weightcategory][0]); [/code] (since it's a one line statement put the ; after it, but if there's a body to the while don't put that one in) That avoids having to use the eof at all, which can cause …

Member Avatar for jonsca
0
195
Member Avatar for sofakingjewish

What are the errors? Find the first one and fix it and many of the later ones will fall away...

Member Avatar for jonsca
0
172
Member Avatar for prodstar

Could you post the complete code? The error is not apparent from what you have posted.

Member Avatar for prodstar
0
172
Member Avatar for corby

In order to print something using a cout statement your function must return something (a string, int, double, etc). Your print() method is void. Just call your print method on its own without sending it into cout.

Member Avatar for corby
0
2K
Member Avatar for shaun2106

Find the coordinates of the center of the screen and add that to your current point. So if the center was at 50,50 and you had a point at 10,10 it would now be at 60,60 in your coordinate system. I don't know much if anything about the graphics.h system …

Member Avatar for jonsca
0
351
Member Avatar for cwarn23

[QUOTE=Salem;1192158]I was thinking of creating my own rival search engine and calling it "[URL="http://en.wikipedia.org/wiki/Bing_Crosby"]Crosby[/URL]" ;)[/QUOTE] I would see your unrelated Crosby entity and raise you Stills and Nash (and maybe even Young). I keep wondering when Bing is going to start making decisions for me -- it's supposed to tell …

Member Avatar for Ene Uran
0
217
Member Avatar for WaltP

I never seem to have any soda ash around the house when I really need some though.... Also, is there a microwave version?

Member Avatar for Ene Uran
1
164
Member Avatar for vmanes

[quote] some wire strippers [/quote] I believe the term "dancer" is preferred nowadays ;) (I know I know... I just couldn't resist)

Member Avatar for Ene Uran
2
213
Member Avatar for zeus77

If you have it all in one file like that you need the hash.h portion up top, followed by the hash.cpp portion, followed by the main.cpp portion (and take out the hash.cpp/hash.h code you have pasted directly into main). The hash.cpp portion could be after the main program instead if …

Member Avatar for jonsca
0
74
Member Avatar for aleX_X

You don't need one as a shallow copy is okay. The compiler is complaining because you didn't put the () after [icode] myRecord.getpPtr [/icode].

Member Avatar for umairch
0
193
Member Avatar for Violet_82

> Thank you VernonDozier, I can ensure you that I always try hard myself before asking anything on the forum, the reason being that I want to learn how to program. > Thanks for posting the code, I had a look at it and I don't think I could have …

Member Avatar for Violet_82
0
253
Member Avatar for carlomarksimon
Member Avatar for Dani
Member Avatar for ghost_from_sa

Just do a simple bubble sort. See [url]http://www.cprogramming.com/tutorial/computersciencetheory/sorting1.html[/url] for an example.

Member Avatar for ghost_from_sa
0
105
Member Avatar for slowlearner2010

[QUOTE=slowlearner2010;1209885]thanks Ancient Dragon, really? thank for your info, i didn't notice it but everytime i start dat program it'll keep remind me that 20 more days left...i think to [/QUOTE] Sorry to bump your solved thread, but go to the help menu and the 6th option down is "Register Product". …

Member Avatar for slowlearner2010
0
163
Member Avatar for fellixombc

Somebody else can probably illuminate this a little bit further, but there really is a y1 declared in math.h. It appears to be associated with an older version of the complex type(?). Seemingly, if you [icode] #define _NO_OLDNAMES [/icode] before you [icode] #include <cmath> [/icode] it should disregard those declarations. …

Member Avatar for NathanOliver
0
415
Member Avatar for lolsh

[quote] here are my answers..plzzz check them for me. [/quote] Here's a wild idea. What happens when you run them in your program? Do they work there? And "plzzz" use code tags: [noparse][code] //code goes here [/code][/noparse]

Member Avatar for jonsca
0
103

The End.