4,439 Posted Topics
Re: I see a modest effort on your side. That's already something. Why not try it like this : Make a list of primes Print the n first numbers from the list. This is the code to start with, you should be able to complete it. [CODE=csharp]using System; using System.Collections.Generic; using … | |
Re: Many things could be wrong here. Without some code, I feel like a blind man trying to break an egg with a stick... Btw how is the wife? All well? | |
Re: StreamWriter is in essence file IO. So that should not cause that much of a problem. And a VERY BASIC GUIDE to SQL Database? If I had one I would give it. But you alwyas have to set up a connection, sqlcommands(insert,delete,update). It is helpfull if you know what a … | |
Re: To find all the combinations of say words of 3 letters from a word of 4 cannot be that difficult. To exclude the "identicals" I would sum their ASCII-char values of a word and test if they are the same. | |
Re: The last line <factor> -> <number> | "(" <exp> ")" says that a <factor> is a <number> or a <exp> enclosed in brackets. The line <term> -> <factor> { "*" <factor> | "/" <factor>} means that a <term> is a <factor> followed by zero or more <factor> things which are … | |
Re: Do you want to read file or folder names from the C:drive and store them in the TreeNodes of a TreeView control? What have you already coded yourself? | |
Re: [QUOTE]why is control in set property executing base class code? [/QUOTE] You told it to do so by calling [B]base[/B] When a method or indexer in this case is marked virtual it [B]can [/B]be overridden it doesn't [B]have [/B]to be overridden. Hope this helps. | |
Re: If it's a smulation, why use 2 programs? And why not using events? Could you provide a bit of code on what you got so far? | |
Re: [CODE=csharp]public int STR { get { return str; } set { str = strBox.Text; } } [/CODE] This looks like a property to me, but your syntax is not correct do it this way: [CODE=csharp] private string str; public string STR { get { return str; } set { str … | |
Re: You could start to read [url]http://www.mactech.com/articles/mactech/Vol.15/15.09/PDFIntro/[/url] | |
Re: Maybe you get some ideas from Prim's algorithm. Read [url]http://en.wikipedia.org/wiki/Prim%27s_algorithm[/url] | |
Re: Always tree for loops for this to work: [CODE]for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) for (int k = 0; k < N; k++) C[i][k] += A[i][j] * B[j][k];[/CODE] and I should read very carefull what MozaicFuneral has to … | |
Re: Do you want to test for inequality or do you want a method to solve it? Testing is easy : use an [B]if [/B]statement For solving I would suggest that you translate in code, how you solve it by hand. | |
Re: [QUOTE=Ezzaral]Typed pages or hand-written pages? [/QUOTE] lol Anyone in for a goose feather? | |
Re: This might help, although I would not suggest it to the faint of heart... [url]http://www.arstdesign.com/articles/office2007bin.html[/url] | |
Re: case 3: // output = " \tWithdraw"; //UnderConstruction(output); WithDraw(); break; [B]WithDraw [/B]should return something to a "global" variable. I know the compiler should give you an error here, but it doesn't... | |
Re: You can always use the form load event if you want to do something beforehand `:private void Form1_Load(object sender, EventArgs e)` { //do something before other actions } | |
Busy writing an infix to postfix converter.(I'm a strange guy. I like to do those things from time to time...) I have a class Expression which is in essence : [CODE=csharp] [StructLayout(LayoutKind.Explicit)] //in c/c++ this is a union public struct Valoper { [FieldOffset(0)] public int Value; [FieldOffset(0)] public Oper Operand; … | |
Re: I know there are specialized library book applications out there. Maybe you should find out and buy one of those? | |
Re: You first have to connect to your database, use something like : SqlConnection con = new SqlConnection("<connectionstring>"); | |
Re: In the pro version you can have a command window with all the needed paths preinstalled in the PATH variable. In the express version you can use the "Create your first application" on the startpage. It opens a window wich contains a link to creating a console application as well. … | |
Re: Leave out the equal sign in [B]<=[/B] ! Else you are counting from 0 to 25 inclusive, which is 26, not 25. | |
Re: Check out this site: [url]http://www.dreamincode.net/forums/showtopic33396.htm[/url] | |
Re: If your DataGrid is bound to a DataTable of a DataSet, you could use the DataTable to get the data. You could also use the CurrentCell structure of the DataGrid control. | |
![]() | Re: Start reading! e.g. Wikipedia. Search for PREFIX,INFIX and POSTFIX. |
Re: Question 2: I am using C#.NET under the same conditions you are using C++.NET. I can write unmanaged code if I want to(why should I do that?), but it is not "native" it is translated into IL an intermediate language. This IL is compiled by the JIT (Just In Time … | |
Re: [QUOTE=Antenka]The || - is short version of |. [/QUOTE] That is not quite true, but I realize at first it was fuzzy for myself also. || is a [B]conditional [/B]OR, it works with booleans : [B]Abool || Bbool[/B], if [B]Abool [/B]is [B]true [/B]it won't look at [B]Bbool[/B]. | is a … | |
Re: Let's say you tell me : "I have a boat." The first thing I would ask : "What kind of a boat?" All boats have things in common, so if I wanted a boat class I would make it abstract so that I cannot do [B]boat myboat = new boat();[/B] … | |
Re: I'm just a simple guy trying to solve some questions. I don't know what KNN or ID3 is, could you please refrase your question? | |
Re: Hey, hey, hey,tangaraforyou, Did you notice? In my signature it states [B]Make love, no war.[/B] The make love part does not mean that is is needed that you have to behave like most rabbits do. It really maens to make love, to be friend. Why do you think you have … | |
Re: Something like : [B]picturebox1.image = imagelist1.Images[currentIndex];[/B] might do the trick. imaglist must contain images of course. | |
Re: Also try to read and understand a recursive descent parser : [url]http://en.wikipedia.org/wiki/Recursive_descent_parser[/url] | |
Re: [QUOTE]i try to read my errors, but no success[/QUOTE] Does this mean you have become blind? If not, consult at least an ophthalmologist. Maybe he/she can help you(with a pair of glasses) so you can read your error messages again. | |
Anyone out there any ideas why this compiles and runs? I'm using Visual C# 2008. [CODE=csharp]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { public enum fluf_value { thegood, thebad, theugly, }; static fluf_value MyFunc() { return fluf_value.theugly; } static void Main(string[] args) { MyFunc(); … | |
Re: Try this : [url]http://www.codeproject.com/KB/cs/moemeka4.aspx[/url] btw congratulations with your son you must already feel like a proud father! | |
Re: Put a timestamp field in your table and use a query to get the record with the most recent timestamp. | |
Re: I assume you can read? Well read : [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: I don't know if this function exists, but you can always make your own like this: Something like a dir-command in DOS [CODE] using System; using System.IO; class MyProg { static void Main(string[] args) { DirectoryInfo dir = new DirectoryInfo(@"c:\"); FileInfo[] files = dir.GetFiles(); //return files of the c dir … | |
Re: What is the problem? Write a function! int userselection() { cout... cin ... return an int } Do the same with the computerselection... | |
I thought it was a simple task at first. Don't ask me why, but I wanted to display a number in it's binary form. Manipulating bits in C# seems a bit(no pun...) harsh. The best I could come up with was : [CODE=csharp]static void Displaybinary( uint i) { const byte … | |
Re: Makefiles have nothing to do with the kind of editor you are using. I gave up makefiles 20 years ago. I suggest you do the same, unless your a diehard then I wish you all the luck. Today there are enough systems where you can do without them. | |
Re: | is the bitwise OR operator it means you are performing an OR on 1 bit(0 and 1). This is in contrast with the logical OR operator || which performs his actions on true and false values(booleans) >> is a bitwise right shift operator. In your case the hex value … | |
Re: The 5 digits before have nothing to do with it. When your system is rounding to tenths then xxxx.47.. is rounded to xxxx.5 just as xxxxxx.79.. is rounded to xxxxxx+1. Read also : [url]http://en.wikipedia.org/wiki/Rounding[/url] | |
Re: [QUOTE]Array indexing has a cleaner syntax[/QUOTE] You said it yourself! So why bother and make your life difficult. When you come back later to your code it will be more easy to understand then if you used pointer arithmetic. If you have a good C++ compiler he would translate both … | |
Re: What was the value of [B]i[/B] before you went into the while loop? | |
Re: This site might help : [url]http://www.cs.plattsburgh.edu/~salvador/csc453/projects/project1/html/dec2bin_demo1.html[/url] Happy programming! | |
Re: Have you read : [url]http://en.wikipedia.org/wiki/Knapsack_problem[/url] ? [QUOTE]so i need to sort) I am not able to do so.Please help me out.[/QUOTE] Why are you not able to do so? Please explain. | |
Re: C and assembly can make it easier to implement an OS, but in the end it's all machine code :0000101010100000100010100101010101010000011111010101001.... | |
Re: Why 5 classes? Think about how you would structure your assignment. Draw something on paper. And you must look harder on internet, it took me 2 secs to find this [url]http://www.bloodshed.net/c/index.html[/url] and ther is more! Just make the effort of doing it. Happy programming! | |
Re: I assume the numbers are x and y? You set them to zero and then you do an if saying if(0<0) then... Do you think this can work? First cin x and cin y then call a function say int GCD(x,y) to compute your gcd and cout that. And btw … |
The End.