1,857 Posted Topics

Member Avatar for mystycs

If your number has multiple digits a stringstream will work but you have to use the extraction operator(>>) to get automatic conversion: int currentqueue = 0; string input = "123"; std::stringstream converted; converted << input; converted >> currentqueue;

Member Avatar for tinstaafl
0
330
Member Avatar for uDevv

If you have control over the .dll source code, make the login form modal(.ShowDialog) and open it in the Load event handler of the .exe form. If the dialog result is good continue loading the .exe form. If it's bad try again or quit altogether.

Member Avatar for tinstaafl
0
247
Member Avatar for Emma_3

One way to make your coding more efficient is to use a string to represent the digits that may be encountered: const string digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Now for any base the value of a particular digit can easily be converted to the appropriate symbol just by using the index of …

Member Avatar for David W
0
521
Member Avatar for romain2193

[Click Here](http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.items%28v=vs.110%29.aspx)

Member Avatar for 21310051
-1
100
Member Avatar for romain2193

[Click Here](http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.items%28v=vs.110%29.aspx)

Member Avatar for 21310051
-1
95
Member Avatar for 21345572

Basically it's when you assign a default value to a member. For number types this usually means 0. For strings usually an empty string(""). For more complex, types the `new` keyword is used to get the system default value(s) assigned to the member.

Member Avatar for 21310051
0
78
Member Avatar for YA RAMSAMKER

The source code is automatically generated when you design the GUI. It's greatly discouraged to directly manipulate the GUI code.

Member Avatar for YA RAMSAMKER
0
94
Member Avatar for 21345572

That's very case dependant. The controls do have a Validation event that can be handled to accept or reject the user input. But, the actual code will depend on the type of data and the values regarded as valid.

Member Avatar for tinstaafl
0
60
Member Avatar for xn hunk

You probably are looking for the [Copy method of the System.IO.File class](http://msdn.microsoft.com/en-us/library/c6cfw35a%28v=vs.110%29.aspx)

Member Avatar for tinstaafl
0
102
Member Avatar for mell.mattingly

The first thing I see is syntax errors. You have no open brace for the class prototype and there is an extra closing brace at the end of the code. Also Get_Gas doesn't follow the prototype declaration.

Member Avatar for Iworlock
0
854
Member Avatar for blazemadej

A few things I noticed. To use an object by reference instead of by value use the addrees of(&) operator. To strip the dollar portion from the total cents use the modulo(%) operator To keep a running total, there's no need for a loop, just keep incrementing it each time …

Member Avatar for David W
0
4K
Member Avatar for Kent55

For what you want a class would be handy. Include properties for the keyword, definition, and radiobuttons for each. Instead of randomizing what each definition radiobutton holds, randomize the location of the definitions.

Member Avatar for Reverend Jim
0
349
Member Avatar for vbhobby

The else statement is only executed if the innermost If statement is false. If any of the others are false the execution will bypass the the addition statement. A quick fix, is an else statement for each of the if statements and don't nest them, have each one separate. On …

Member Avatar for babujibabuji
0
283
Member Avatar for Vish0203

It looks to me the first 2 rows are set up to use 50% each and the other rows are fit in as best they can. Try making the row height value literal instead of a percentage.

Member Avatar for Vish0203
0
143
Member Avatar for joshl_1995

A Dictionary(Of String, Panel) would work here: Dim PanelCollection As New Dictionary(Of String, Panel) Dim newpanel As New Panel With {.Name = "Panel1"} PanelCollection.Add("First Panel", newpanel) newpanel = New Panel With {.Name = "Panel2"} PanelCollection.Add("Second Panel", newpanel) newpanel = New Panel With {.Name = "Panel3"} PanelCollection.Add("Thired Panel", newpanel) Now `PanelCollection("Second …

Member Avatar for joshl_1995
0
259
Member Avatar for Labdabeta
Member Avatar for mike_2000_17
0
1K
Member Avatar for Damian_2

To me it looks like your problem is trying to do too much inside one class. For something like this you'll probably find it much easier to use stronger organization of your classes. for example a StudentClass class that contains a vector of Student class which contains a vector of …

Member Avatar for rubberman
0
436
Member Avatar for Bikash_1

Here's one thing that might help a [free open source document management software](http://www.opendocman.com/free-download/) written in PHP and interfaces with a MySQL server. At the very least it can give you a starting point.

Member Avatar for tinstaafl
0
168
Member Avatar for theashman88

I think what you want is something like this: Console.Write("List the first sahabi who was promised paradise \n(hint he was Prophet Muhammad (peace be upon him)'s best friend: "); answer = Console.ReadLine(); if(answer.ToLower() == "abu bakr") { Console.WriteLine("That is correct good job!\n\n"); ++score; } This converts the answer to all …

Member Avatar for theashman88
0
321
Member Avatar for brandon66

A few things to consider: Try to avoid keywords for object/variable names and use something more apropos You may know what it refers to now, but will you remember months or years from now. Using an enum for the 4 conditions(No winner, X, O, and Draw) set to the char …

Member Avatar for brandon66
0
220
Member Avatar for Roily Lucky
Member Avatar for Reverend Jim
0
334
Member Avatar for Patrik_2

Something to keep in mind, in the game 501 the winning player is the one that reaches exactly 501. If a player goes over, that turn is forfeited. Another thing to remember is that not all the scores from 0-60 are valid. Only the 1, 2 and 3 multiples of …

Member Avatar for Ketsuekiame
0
298
Member Avatar for xile27

For that you might be better off loading the rows into a datatable reading the file one line at a time. As far as I know reading a textfile like that will only take the whole file as one table.

Member Avatar for tinstaafl
0
593
Member Avatar for marc.orocay

Why are you asking this over and over? Start applying what you've learned and use it.

Member Avatar for tinstaafl
-2
183
Member Avatar for jen's

This would be one of your first steps, [Read the Rules](http://www.daniweb.com/community/rules)

Member Avatar for tinstaafl
0
30
Member Avatar for kRod

00|01|02|03|04|05|06|07|08|09|10|11 h |e |l |l |o | |d |o |l |l |y | h |e |l |p | |m |e |l |a |n |i |e You can see from this simple table that only indexes 0,1, and 2 contain the same charactrers in both strings and that is what Intersect …

Member Avatar for kRod
0
1K
Member Avatar for gil.nickson

Try this: } ttotal += i; printf("\n \tAnother Product? <1> Yes <2> No :"); scanf("%d", &ap); if(ap==1) goto y; else if(ap==2) goto n; else if(ap>2) { printf("The Program will be terminated"); return 0; } else if(ap=0) { printf("The Program will be terminated"); return 0; } n: printf("\tPlease Enter the Discount …

Member Avatar for noah_2
0
285
Member Avatar for Jeline_1
Member Avatar for tinstaafl
0
173
Member Avatar for kentuckyjoe

Change `Me` to the name of the panel. Alternatively you can use `For Each cControl As Control In Panel1.Controls.OfType(Of Label)` to iterate through just the labels instead of every control.

Member Avatar for kentuckyjoe
0
269
Member Avatar for kRod

Here's a rather simple way to validate the text from a textbox: Dim strtoint As Double = 0 'Check for valid number If Double.TryParse(TextBox1.Text, strtoint) Then 'Less than 1 add leading 0 If strtoint < 1 Then TextBox1.Text = "0" + TextBox1.Text 'A whole number? add trailing 0's and a …

Member Avatar for kRod
2
1K
Member Avatar for Patrick_3

Your problem might be with these: Private CurrentData As String Private CurrentScrollValue As Integer Private CurrentScrollText As String Private CurrentScrollWaiting As Integer Private OutputComm As String Private OutputIP As String Private OutputPort As String Private OutputFile As String Private OutputMode As Integer Private MAX_CHARS As Integer Either intialize them in …

Member Avatar for tinstaafl
0
208
Member Avatar for karaman1
Member Avatar for Meron Aragaw
0
123
Member Avatar for salah_saleh
Member Avatar for tinstaafl
0
97
Member Avatar for </scorpion>
Member Avatar for Khoo
Member Avatar for tiverton

Try using a new compiler. In Windows both Visual Studio and Code::Blocks have free C++ ide's with up to date compilers. Also have you tried optimizing your code? Especially look for redundant blocks that can be put into a function.

Member Avatar for tiverton
0
264
Member Avatar for abousetta
Re: C++

What have you got so far? What have you researched? What have you tried? To test for even values use `if(input % 2 == 0)` to catch odd values use `== 1`

Member Avatar for tinstaafl
0
68
Member Avatar for humorouscheese

> will I still be able to send and read lines from the subsiquent console application the same as if I were to run a console .exe directly? Probably not, at least not without a lot of headaches. But since a .bat is basically a textfile you can read it …

Member Avatar for tinstaafl
0
231
Member Avatar for eriekasato

I think perhaps you've misunderstood the assignment. Here's some revised code that should make it clearer: static void Main(string[] args) { double balance = 0.00; Console.WriteLine("Current credit limit is : " + CustomerCreditLimit().ToString()); Console.Write("Enter the customer current balance: "); balance = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("The credit limit for this balancxe is : …

Member Avatar for tinstaafl
0
419
Member Avatar for mythos061

The instructions for merging are given to you, including which files to get the data from.

Member Avatar for tinstaafl
0
287
Member Avatar for dre-logics

The menu item should have a PerformClick method that you can call in the form's load event handler.

Member Avatar for ryanjayson
0
255
Member Avatar for ridunneii

Your problem isn't that the new dvd isn't be added. The problem is that when you initialize the vector to 5 dvd objects the default constructor creates 5 blank dvd objects. So when you push_back one it's number 6. Try using an empty vector and setting a limit when you …

Member Avatar for tinstaafl
0
344
Member Avatar for oks1998

Using a custom equalitycomparer and LINQ should do the job: Dim hTable As List(Of ListViewItem) = (From lvi In ListView1.Items Let newlvi = DirectCast(lvi, ListViewItem) Select newlvi ).Distinct(New CompareLVI).ToList ListView1.Items.Clear() ListView1.Items.AddRange(hTable.ToArray) Public Class CompareLVI Implements IEqualityComparer(Of ListViewItem) Public Function Equals1(x As ListViewItem, y As ListViewItem) As Boolean Implements IEqualityComparer(Of ListViewItem).Equals …

Member Avatar for tinstaafl
0
1K
Member Avatar for meja

in line 20 change ` total_cost= coffeePrice;` to ` total_cost += coffeePrice;` This will keep adding additional items to `total_cost` until the program exits. If you plan on creating another order before the program exits just set `total_cost` to zero when you start the new order. A couple of notes: …

Member Avatar for Ketsuekiame
0
229
Member Avatar for Vigenere

A few things with your code: As was pointed out using unsigned char gives you more predictable results Using the `islower/isupper` methods to set the appropriate offset to the character code block simplifies your code tremendously The modulus operator(%) creates further simplification by allowing your values to wrap around and …

Member Avatar for tinstaafl
0
569
Member Avatar for AquaNut

One thing I noticed line 19 should probably use matches not patterns. For searching the directory with multiple search terms straight LINQ would work well: string[] patterns = new string[] { "GA1", "GA2", "INTW", "LET1", "RA2", "RA3", "A4", "RA5" }; var matches = (from string f in Directory.EnumerateFiles(wedTemp) from string …

Member Avatar for tinstaafl
0
2K
Member Avatar for skyyadav

It appears to me that an `X` object is created as a member of `D`, which should call `X`'s constructor when a `D` object is created.

Member Avatar for tinstaafl
0
104
Member Avatar for belwaer

This page,[XML in Visual Basic](http://msdn.microsoft.com/en-us/library/bb384833%28v=vs.110%29.aspx), has links to a number of tutorials/walkthroughs that deal with reading/writing/accessing xml

Member Avatar for tinstaafl
0
145
Member Avatar for whatthebobo

Another thing the median returns the index not the value. something like this should work: //find median //Put values in ascending order //Not the best sorting algorithm but useable for (int i = 1; i < count; i++) { if(values[i] < values[i-1]) { int temp = values[i]; values[i] = values[i-1]; …

Member Avatar for whatthebobo
0
267
Member Avatar for Exinta

The End.