124 Posted Topics
Re: [CODE]public Graph( String "graphdata.txt" ) throws Exception { readGraphFile( graphdata.txt ); }[/CODE] This makes no sense to me. Try: [CODE]public Graph() throws Exception { String name = "graphdata.txt"; readGraphFile( name); }[/CODE] Next method: - Do the same thing in the first method. You must make a name for the parameter … | |
Re: First of all, use capital letters to ask questions and write normal sentences. Your question in terms of steps, I am not on a write your code for you. - Make all the methods in your class, empty. - Think of what each method should actually do (e g the … | |
Re: You are asking us to make en entire program for you? Forget it ;) If you have your entire code, but with a problem, feel free to ask me, i'll help you! However, first give some effort, and TRY! Good luck! | |
Hi, I have a piece of code, which gets a string of code from a webpage. It's the HTML source code, from which I want to make an array, in which I can find data the user will input. However, I need to extract all the useful information from the … | |
Hi everyone! I have a strange problem, I haven't been able to solve, even with quite some knowledge of videocards, and computers. I have an nVidia 250 GTS, purchased a year ago (all new, no second-hand). Everything worked very well, until about a month ago. Sometimes, when I power on … | |
Hi all! I have a very strange problem. I am making a Win32 program, using Visual C++ professional 2010. Everything works exactly as it should, until I want a MessageBox to appear. It appears, but I cant click any buttons. I also can't access my main API, so I can't … | |
Hi Daniweb! I couldnt find my problem anywhere else on this forum, so I decided to make my own thread... My problem: I'm trying to make a function to decide how many decimals a 'double' has. My code (slightly edited, here's the base of it): [CODE] // int m = … | |
Re: How do you know if it returns 7 or 7.00? Do you print a double or an int? When you convert the MyPrice return to an int, it'll become 7. Post some more code? | |
Re: I like your idea for your program. Interesting concept !-) My queston to you: How do you want to compare them? (I mean 'in what way'). Like: is 5-17-2 equal to 17-5-2? An idea for the numbers is: Sort them first. Then, add them in one big integer. Like: 5-17-03 … | |
Re: Hi Joseph, welcome to the forum? I hope your problem is already solved, jsut one remark: Can you use CODE tags, when typing code? They are in the top of your edit controls when editing a post. It'll look like this: [CODE] for (int n = 0; n<max_size; m++) cout … | |
Hi guys, I have a little question. When I make a dialog in Visual C++ 2010, with the Dialog Editor, you can Drag and Drop buttons, Edits etc. I can also test my dialog. The buttons and edits look very nice, the Windows 7 style. However, when I compile my … | |
Re: I agree with Frederik2, partly. A book would be great, but there are also some nice tutorials online, for free, sometimes with video's. (You probably already did that, just read on). I've been programming for about 1,5 months, (I started with straight c++ in Windows Visual Basic, free version (you … | |
Re: You are asking us to make en entire program for you? Forget it... If you have your entire code, but with a problem, feel free to ask me, i'll help you! However, first give some effort, and TRY! Good luck! | |
Re: Do you mean like: Shoot in 23, if there's no baffle it will exit in 6, if there's a baffle, it will exit in for example 12? Could you post some of your code? I like the idea, it's an interesting game... | |
Re: I dont know if you're familiar with Win32 API, using c++? If yes, try a tic tac toe game (very easy), or some other game. You can also make a program which encrypts/decyfers a file. Maybe you can specify the different algorithms, and make some secret language program. Maybe you … | |
Re: Lol? First write all your code [CODE]for (int i = 0; i< a_lot; i++ ) {check for errors, compile it }[/CODE] debug it untill it works! Then post the code here, if there are some strange errors that you dont understand. Maybe we can? Good luck mate, I'll mark this … | |
Re: [code] int n; // Assign n some value // switch (n) { case 0: cout << "n = 0"; break; case 3: cout << "n = 3"; break; case 7: cout << "n = 7"; default: cout << "n is not 0, 3, or 7." break; } [/code] The case … | |
Hi guys, I need some help with sprintf. I get the general idea, and I think everything works, but my MessageBox will not diplay the right text. [CODE]int a = 25; char buf [80]; sprintf(buf, "%d", a ); MessageBox(NULL, (LPCWSTR)buf, L"Sel Change", MB_OK);[/CODE] | |
Re: OK: here's the deal. DO NOT USE GoTo, unless VERY neccesary. Usually there's no need to use it. Why dont you look at your code, I modified it a bit: (I like to use bools for loops, if you dont, use somthing else. Switches can also work!) [CODE]#include <iostream> #include … | |
Re: You could try to specify boudaries to the rand (), maybe that would help... Try this: [CODE]#include <iostream> #include <cstdlib> using namespace std; int main() { int x; x = rand() % 1500 + 1; cout << x; return 0; }[/CODE] | |
Re: The inline function makes sure the variable is stored in a different place in the memory, so that the computer can access it very quickly. It's mostly used on old computers, that are quite slow, with programs like these: [CODE]///.... inline void func () { for (int n; n <100000; … | |
Re: Do you know we have a little button called (CODE) for this? | |
Re: Or: [CODE]cout <<"hello" << "how ya doin?" << "goodbye.";[/CODE] Or even better: [CODE]printf ("Hello! How ya doin? \n Goodbye!") [/CODE] Printf lets you print your variables without having to keep typing the << " " etc... | |
Re: Thanks a ton! This is exactly what I needed! |
The End.