4,439 Posted Topics
Re: PLEASE! Use CODE tags when you send us code. A while statement is quite simple : [CODE]while (condition) { /*do something*/ }[/CODE] A condition is something you see in an if-statement also. Example : [CODE]/*counting to three*/ int i = 0; while (i<3) { i = i + 1; printf(" … | |
Re: Hey UrClothesRBlue I think mina1984 has left us and gone to Mars so why bother any further... | |
Re: You could write a strlen function in any language but assembly is the fastest you can get, perhaps thats why. The only problem is the way the fastest is implemented on a microprocessor. It makes it less portable. How can you be sure the listing is how the C++ compiler … | |
Re: [QUOTE]that reached from two others[/QUOTE] What do you mean by that? C# doesn't support multiple inheritance like C++. And I really don't understand your problem with "sealed". Sealed is as it says : "sealed". Even me, as a non native english speaker can understand the word. | |
Re: Don't mess with the loop variable in a for loop. Copy it and mess with the copy. | |
Re: In C# this would be easy. Use jagged arrays! But yeah if you're sticking to C++ you might want to read [url]http://blog.voidnish.com/?p=16[/url] | |
Re: Hey Baaaaaaaaaaaaaaaaaaaarhhh aaaaaaaaaaaaallaaaaaaaakkaka IIIIIIIIIIIIIIIIIII WWWWWWWWWWWWWWant to beeeeeeeeeeeeeeee YYYYYYYYYYYYoooouur frIIIend What is your problem? Have you any code? Is it working? If it isn't what are the errors you are getting? Tell us we and will help you. | |
Re: [CODE=C++]void addFriends (friendType friends[]) { string name; cout<<"Enter 5 friends names (First and Last)"<<endl; for (int i = 0; i<FRIENDS; i++) { cin>>name; } }[/CODE] You got to fill up your [B]friends [/B]array with your [B]name [/B]variable. Btw what if you have less then 5 friends, what if you have … | |
Re: Show us the code you have so far. Don't forget to put your listing in CODE tags! | |
Re: I agree with LizR. C# is a C-like language, in C you have only functions, no subroutines. When you want to "simulate" a subroutine in C, C# or C++ you use something like [CODE]void MyStuff() { //do my stuff }[/CODE] When you use functions in a class you call them … | |
Re: Read more here [url]http://en.wikipedia.org/wiki/Endian[/url] | |
Re: protected means just that: protected. Only FormParent can use "Modified", nobody else. | |
Re: I think you're a bit confused with files here. (Oh man if you knew how confused I still am, somethimes...) A StreamReader is just that, a reader of a stream of bytes. It does not delete something, it has no Delete method. In your case it reads a [B]line [/B]from … | |
Re: [QUOTE]Q) [B]Draw [/B]an inheritance hierarchy... [/QUOTE] Take a pencil and a piece of paper and DRAW, DRAW, DRAW! By the way, this is an initial phase in any serious programming endeavor : put something on paper first. Don't start to run before you can walk. | |
Re: Here is code [CODE] // // previousBtn // this.previousBtn.Location = new System.Drawing.Point(73, 52); this.previousBtn.Name = "previousBtn"; this.previousBtn.Size = new System.Drawing.Size(75, 23); this.previousBtn.TabIndex = 0; this.previousBtn.Text = "Previous"; this.previousBtn.UseVisualStyleBackColor = true; // // nextBtn // this.nextBtn.Location = new System.Drawing.Point(73, 126); this.nextBtn.Name = "nextBtn"; this.nextBtn.Size = new System.Drawing.Size(75, 23); this.nextBtn.TabIndex = 1; … | |
Re: Does your path variable has a value? Normally you do something like this : [CODE]if (dlg.ShowDialog() == DialogResult.OK) { //get your path here } dlg.Dispose();[/CODE] | |
Re: Try something like: [QUOTE]string query ="INSERT INTO emptable(Name,Sal) VALUES(aname,asalary)"; SqlCommand cmd = new SqlCommand(query, connection);[/QUOTE] I don't see why you should format your string. | |
Re: Show us "the stuff" that's different in C# and C++ and where you seem to have problems with. | |
Re: [ICODE]&[/ICODE] is a bitwise AND operator while [ICODE]&&[/ICODE] is a logical AND operator | |
Re: You can work with a single file but it has to be in a project. Why is that? You probably ask. Well you might add some other files later(resources, databasefiles, etc.) if you stay with one file OK, but it's handy if you have more files to keep them in … | |
Re: Set n=0. Read your file per character xor it with your key(n). Increment n. If your key is k chars long(n=k) start again with n=0. | |
Re: You are not smoking some of those funny sigarettes, are you? Please restate your question so that a simple mind like mine can understand what you are trying to say. | |
Re: Could it be that your return statement in the sum-function is in the for-loop? It is indented that way. | |
Re: Maybe try the following: [url]http://www.amazon.com/All-One-Desk-Reference-Dummies/dp/0764517953/ref=sr_1_2?ie=UTF8&s=books&qid=1225027816&sr=8-2[/url] | |
Re: I suggest you draw a flow-chart of the things you have to do, distill the variables and actions(functions) from it and start programming. Run your program, if you encounter errors, come back and w'll help you further. | |
Re: If you know what a switch statement does you're half the way... | |
Re: You can get a Fontsize property you can not set it. If you want to set it make a new font instead. | |
Re: Has nothing to do with whether you start with 0 or 1 in array addressing. In Pascal you could start from 100 if you wanted to do that. Look at your code: [CODE]array[2] = array[1]; array[3] = array[2]; array[1] = result;[/CODE] Now look at this code: [CODE]array[3] = array[2]; array[2] … | |
Re: In your while loop, you never change the choice variable to something else then 1. It is testing for choice==1 or choice==2 so it will keep looping forever. | |
Re: Look at Devin Jenson's Weblog [url]http://blogs.msdn.com/devinj/archive/2005/07/12/438323.aspx[/url] for a discussion on the subject in C# | |
Re: What version of express are you using? ConfigurationManager should be in the System.Configuration.dll. | |
Re: [ICODE]while (connectionRead.Peek() > 0)[/ICODE] should be [ICODE]while (connectionRead.Peek() >= 0)[/ICODE] This will probably not help but it's a start. I assume "textOutput" is a textbox. Why don't you rename it to something more usefull like you should do for the "sendText" textbox? Find & Replace is a build in utility … | |
Re: I think the same. Don't call your textboxes "sendText". Use something like "sendTextTxb" that way you will get less confused. | |
Re: The only thing you can change for a font in a Consolewindow are colors. For example like this : [ICODE]Console.BackgroundColor = ConsoleColor.DarkCyan; Console.ForegroundColor = ConsoleColor.Red;[/ICODE] Which will give you red letters on a blue background when you use a WriteLine after those calls. (uugheeK!?!) If you really want to get … | |
Re: Design view is just, well, design. It's making programming a little bit easier. It relieves you of all the boring things like initialising the color, position etc. of a button for instance. The code for that is automatically generated for you during the design process. When your program has got … | |
I started programming in 1980 and I still do, because I love the trills of it:icon_smile: I programmed in BASIC, C, Pascal, Modula-2, C++, etc. Now I am particularly fond of C#, you should also! Check it out! | |
Re: Visit this site : [url]http://oreilly.com/catalog/progcsharp/chapter/ch18.html[/url] It gives you a whole chapter of the book "Programming C#" from O'Reilly books. Hope this helps. | |
Re: There is as of .NET 2.0 a Math.Truncate function. It migght help. |
The End.