1,857 Posted Topics

Member Avatar for Quast

The code was probably designed for a different .net framework. If it's lesser change the framework type in the properties. If it's greater you may need to upgrade your version of VS.

Member Avatar for Quast
0
133
Member Avatar for ravi_14

You should probably read this [article](http://www.cplusplus.com/articles/2LywvCM9/) and gain a better understanding of what inline functions are and how to call them.

Member Avatar for David W
0
209
Member Avatar for jakizak

First piece of advice turn on `Option Eplicit` and`Option Strict`. You're calling the sub routine a Function but it has no return type nor is it returning anything. To access a field or property inside a class it must be declared as Public. Use that instead of Dim. Now the …

Member Avatar for jakizak
0
1K
Member Avatar for Neil_4

Do you want it on a row above the other one or sitting right on top of it basically obscurring?

Member Avatar for tinstaafl
0
92
Member Avatar for david.helfgott.1

Hard to say why it's not working since you don't show the code you're using. However, this `richTextBox1.SaveFile("myrtffile.rtf");` should work. Loading the file could look like this: `richTextBox1.Rtf = System.IO.File.ReadAllText("myrtffile.rtf");`

Member Avatar for tinstaafl
0
58
Member Avatar for omar.ossama.11

One of your main problems start here: `main()`. There is no return type. Since your returning 0 I would assume you want `int main()`, since that is the standard declaration. Also in `getline` you've declared `c` as int but you use it as a char. While this works it is …

Member Avatar for fahadkhan6302
0
169
Member Avatar for pirat4e

This code probably is where the problem is. However without the code showing the class(es) represented in your code, it's pretty hard to decipher what exactly your code is doing.

Member Avatar for pirat4e
0
340
Member Avatar for oren.turgeman.9

So which code is the one you're using? this one or the one [here](http://www.daniweb.com/software-development/csharp/threads/479934/csv-file-replace-on-specific-column)?

Member Avatar for tinstaafl
0
583
Member Avatar for theashman88

It's hard to tell exactly what you mean. The form has a BackgroundImage property that you can set to show an image in the background. You also have available a PictureBox control which you can use to show images.

Member Avatar for tinstaafl
0
117
Member Avatar for TarkiB

It appears to me that `sender` is of type `Button` and you're trying to cast it as a `DataGrid`. When the cast fails, `dgResults` will be nothing and any calls to it will result in the exception.

Member Avatar for arunkumars
0
295
Member Avatar for Vasthor

The main problem appears to be int trying to change the value of a constant. If you remove the `const` declaration for the `>>` operator in the declaration and the method, it should work: #include <iostream> template <unsigned, unsigned> class Screen; template <unsigned H, unsigned W> std::ostream& operator<<(std::ostream&, const Screen<H, …

Member Avatar for tinstaafl
0
172
Member Avatar for Jimin

One thing I noticed: `ioHandler::getAccount` doesn't validate the user input. Also since `acc_list` is an array of type `Account` you don't need to declare an element to assign a value to it: Instead of: Account acc_list[count](a); Try: acc_list[count] = a; In: void AccountList::insertAccount(Account a) { if (count > MAX) { …

Member Avatar for tinstaafl
0
343
Member Avatar for airhalynn101

It looks to me that you have 2 main options. 1 - In the load event handler loop through the Textboxes and add your code as a validating event handler, or whichever one seems appropriate. 2 - Change all the textboxes to a custom control that inherits TextBox and validates …

Member Avatar for airhalynn101
0
215
Member Avatar for Ahmed_51

Just a quick perusal shows 2 things: if (double.TryParse(Textboxother.Text, out n)) MessageBox.Show("Please Enter a Valid Length. \n Amount given is: " + Textboxother.Text); if (float.TryParse(InterestRateCB.SelectedItem.ToString(), out r)) MessageBox.Show("Enter a Valid Interest Rate"); Both of these should be using the '!' operator.

Member Avatar for tinstaafl
0
550
Member Avatar for Lethugs

A couple of things: Your string is returning a comma-delimited line of values. You may need to split it by ","c and insert the appropriate fields into your table. Using a dictionary will simplify your code tremendously: ReadOnly DecryptChars As Dictionary(Of Char, Char) = New Dictionary(Of Char, Char) From { …

Member Avatar for Lethugs
0
342
Member Avatar for smitsky

Here's a pretty good [explanation](http://www.cplusplus.com/reference/queue/priority_queue/?kw=priority_queue) of the priority_queue. Basicaly it boils down to the fact that indexing([]) isn't implemented but random acces iterators are.

Member Avatar for tinstaafl
0
928
Member Avatar for Satyam_1

This [example](http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.print%28v=vs.110%29.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2) in the MSDN documention shows how to set the margins when printing a page.

Member Avatar for tinstaafl
0
149
Member Avatar for asia_6969
Member Avatar for pdk123

Your code doesn't seem to match your description. Does the key represent a user or a user group? This is confusing because you've commented the int_vect as a vector of users. Does this mean that you want to add, remove, or move users from one vector or another? Or do …

Member Avatar for pdk123
0
253
Member Avatar for Felix Arba
Member Avatar for pdk123
Member Avatar for phony

Umm, errors mean you didn't do something right. Most of your errors appear to be syntax related. for instance you have: bool DynStack<T>:isEmpty() Instead of bool DynStack<T>::isEmpty() As you fix each error do a new build, since the way compilers read source code one syntax error can multiply and throw …

Member Avatar for tinstaafl
0
1K
Member Avatar for Alxprog

From my understanding the biggest deciding point is portability. C++ is very portable and be easily ported to different operating systems. C# is designed for Windows using the .net library. You can acheive some portability with it by using a third library, like Mono. Much of the syntax is very …

Member Avatar for Alxprog
0
644
Member Avatar for Mhayt

First thing research how to institute a menu interface for you app. Then start researching code examples for the different functions. What you're asking for is easy to research and find. Once you have some code you're trying to get working but can't start a new question.

Member Avatar for pritaeas
0
157
Member Avatar for yogesh_10

You could use a DataTable as the datasource for the datagridview. It has methods for loading and saving .xml files.

Member Avatar for tinstaafl
0
130
Member Avatar for trach

Some things I'd suggest: Use a menu for user inputs at the start of the program and to set up the game. Use a letter/number combination for the coordinates of the grid. Use a function to display the grid using the grid size and the array as parameters If you …

Member Avatar for tinstaafl
0
466
Member Avatar for AtillaKahuna

Here's one way using LINQ: Dim searchstr = "9001" doc.Descendants("OfferProgressTotals") _ .Where(Function(x) x.HasAttributes) _ .Where(Function(x) x.Attribute("OfferID").Value = searchstr) _ .First(Function(x) Console.WriteLine("Offer ID : {0}" & vbNewLine _ & "Eligible Date : {1}" & vbNewLine, _ x.Attribute("OfferID").Value, _ x.Element("EligibleDate").Value) Return True End Function) _ .Descendants("OfferProgressTotal") _ .ToList _ .ForEach(Sub(x) Console.WriteLine("ID : …

Member Avatar for tinstaafl
0
192
Member Avatar for beastie805

One problem you could be having, is you're calling your sub routines without initializing `firstRecord`. As a result it contains random data, which could be causing your routine to crash. Try something simple like `int firstRecord = 0;`. If you still have a problem submit some test data which will …

Member Avatar for Ancient Dragon
0
193
Member Avatar for BogdanCov

If I'm not mistaken, buttons don't have that functionality. One way to work around this, is to use a label which also has a click event and allows transparency. If necessary you can flip between border styles to simulate a button.

Member Avatar for ddanbe
0
221
Member Avatar for Emma_3

For what you're doing string and vector would be much easier to use than creating arrays out of raw memory: #include <iostream> #include <fstream> #include <string> #include <vector> using std::string; using std::vector; using std::cin; using std::cout; using std::ifstream; int main() { const int size = 100; ifstream data_file ( "Text.txt" …

Member Avatar for Emma_3
0
265
Member Avatar for JOSheaIV

The TableLayoutPanel is a container control its designed to hold other controls not display text. Use textboxes, richtextboxes in the cells to handle the key presses.

Member Avatar for JOSheaIV
0
453
Member Avatar for dolfinchris

Or having somewthing to say that people are willing to read and selling advertising and/or using pay-per-click

Member Avatar for KonRadicool
1
300
Member Avatar for Nandomo

The one thing that jumps out at me, is that your class is called `Service` but the only place you try to call `GetDateRange` is with an object declared as type `ServiceClient`. If you do indeed have a class called `ServiceClient` you'll be seeing the output from that class not …

Member Avatar for Nandomo
0
194
Member Avatar for Pilot122x

Try adding `\n` to your string. If that doesn't work try `\r\n`. >Also How would I make a If statement where if the button is clicked then it prints "Hola" into the richtextbox? First step would be to create an event handler for the button click event. Then put the …

Member Avatar for Pilot122x
0
154
Member Avatar for ddanbe

Have you tried assigning `grouping.Sum(s => s.Item1)` to a variable, something like this?: public static tuplePolynomial operator +(tuplePolynomial tp1, tuplePolynomial tp2) { tuplePolynomial Result = new tuplePolynomial(); Result.Terms = ( from t in tp1.Terms.Concat(tp2.Terms) group t by t.Item2 into grouping let groupingsum = grouping.Sum(s => s.Item1) where groupingsum != 0.0 …

Member Avatar for ddanbe
0
241
Member Avatar for hendersonl

One relatively simple way would be with LINQ: ListBox1.Items.AddRange(Enumerable.Range(2, 699).Select(Function(x) (x / 100).ToString).ToArray)

Member Avatar for Firstgamefreak
0
139
Member Avatar for jhender4880

Your problem is here: cout << "Enter player # " << (i + 1) << "'s full name: "; cout << endl; cin.ignore(); cout << endl; getline(cin, soccer[i].name); cout << endl; The `cin.ignore();` is ignoring the first character typed. Also all those `endl`'s aren't necessary. Try this instead: cout << …

Member Avatar for tinstaafl
0
2K
Member Avatar for mmegue
Member Avatar for wrathness
0
288
Member Avatar for Afaf

Your first step will most likely be to create a class to represent each student.

Member Avatar for iamthwee
0
233
Member Avatar for Elharts
Member Avatar for ravi_14

The value depends on the object. Intrinsic types have a default built into the type. Custom types can be set within the code.

Member Avatar for deceptikon
0
103
Member Avatar for AmrMohammed

Since the forms derive from a form that calls the method in the load event each derived form will also call the method, but because that method is overriden the specific one to the derived form is used. If you want to override that behaviour you should be able to …

Member Avatar for tinstaafl
0
130
Member Avatar for theashman88

The get and set allow you to use code to adapt the input to fit the property. For instance if the values allowed for the property are restrictive you can validate the input in the set before passing the value to the property. Another use of these is to obscure …

Member Avatar for tinstaafl
0
229
Member Avatar for RoseB

How do the values in your examples correspond to the variables in your code or the columns in your datagridview? What does SYD do?

Member Avatar for Mr.M
0
458
Member Avatar for DS9596

Using a couple of arrays as lookup tables will help shorten your code tremendously: const string digits = "IVXLCDM"; const int number[] = {1,5,10,50,100,500,1000}; int amount[] = {0,0,0,0,0,0,0}; string ToRoman(int input) { if(!input < 4000) return "Invalid input"; for(int i = 6;i > -1; i-=2) { amount[i] = (int)(input/pow(10,(i/2))); input …

Member Avatar for StuXYZ
0
5K
Member Avatar for theashman88

your code is mostly correct. You have the limit on the first for loop as less than or equals(<=) to passengers.Length. This means you must oversell 1 seat in order to exit. This should be just less than(<). Also the routine to print the names should be outside the main …

Member Avatar for tinstaafl
0
1K
Member Avatar for henrimontreal

It would probably help to break your problem down into parts. First decide what language you will be using. Since you want a GUI, using a .net language would probably be the easiest. If you have a background in c++ the c++/clr option is viable. You could also easily go …

Member Avatar for tinstaafl
0
237
Member Avatar for Abigail.Galingan

A Listview can't accept a datasource. You'll have to put the data into a datatable and parse each row and add the data to the listview. You might find a DataGridView, which will accept a datasource, much easier to work with in this case. Then it's a matter of creating …

Member Avatar for tinstaafl
0
203
Member Avatar for theashman88

Basically on each iteration it chooses a random index and increments the value stored in the array at that index by 1. The end result is, you should end up with each item, from index 1 to 6, in the array containing a count of how many times that index …

Member Avatar for castajiz_2
0
442
Member Avatar for Mart_webber

Instead of sending your output to the screen as soon as you get the discount value, it's much easier to read if you save the discount and have only 1 `cout` statement. Also checking for the maximum value first simplifies the if-else structure. Something like this: #include <iostream> using namespace …

Member Avatar for David W
0
227

The End.