921 Posted Topics
Whats the highest score you can get ?? [URL="http://www.ferryhalim.com/orisinal/g3/00bells.swf"]Link[/URL] My best sofar is 1,113,870 :) Have fun. | |
Re: Read [URL="http://www.catb.org/~esr/faqs/smart-questions.html#homework"]this[/URL]. ![]() | |
Re: [QUOTE=yoyo0;673325]is it gooooooooooooooooooood????????[/QUOTE] Nope.. read Salems post... | |
Re: I agree with [B]Salem[/B], I dont like to encourage cheating.. but heres somebody who has already solved this problem. [URL="http://www.daniweb.com/forums/post663383.html#post663383"]Link[/URL] | |
Re: Ever heard of a search engine ?? [url]http://www.google.co.uk/search?hl=en&q=library+sort&btnG=Google+Search&meta=[/url] | |
Re: Start [URL="http://www.winprog.org/tutorial/start.html"]here[/URL] | |
Re: Look at [URL="http://www.daniweb.com/forums/thread24999.html"]this thread[/URL]. Try asking for your username to be changed there. | |
| |
Re: I wrote a slightly evil code, which I decided not to put up as a code snippet because it completely stops you from doing ANYTHING with the mouse or keyboard :) The only way to get out of it is to either log off (may only work on some computers) … | |
Re: Data stored in classes / structures is not seperated by anything, it can almost be though of as a complex array that can hold different data types. That is how you can use [B]reinterpret_cast[/B] so that another structure, or even just an array can get the data from the structure. … | |
Re: I think you need to describe what it is your making and what your is problem a little better. Simply saying [B]i'm stuck[/B] isn't enough. | |
Re: I think Wiki_Tiki is using [B]Windows Forms[/B] ([B].NET[/B]) . :) | |
Re: You have to use double backwards slash, try changing it to this. [CODE=CPLUSPLUS]CreateDirectory(_T("c:\\program files\\Testing"))[/CODE] Hope this helps. | |
Re: Try this. [CODE=CPLUSPLUS] class Point { public: double x; double y; Point() { x = 0; y = 0; } Point(double _x, double _y); x = _x; y = _y; } Point &operator =(const Point &p) { x = p.x; y = p.y; return *this; } }; [/CODE] | |
Re: [QUOTE=gregorynoob;669860]I'll just hope you're not in highschool yet so...here's the first function you'll need...it's pretty straightforward: [code]char letter( int mark ) { if( mark <= 39 ) return 'F'; else if( mark <= 49 ) return 'E'; else if( mark <= 59 ) return 'D'; else if( mark <= 69 … | |
Re: [QUOTE]In WinProc() I think you need to add code for WM_CREATE.[/QUOTE] You dont need anything there, it is simply for any extra things you want to do just before the window displays. Ok, theres quite a few problems in this code, I will list a couple of them. [LIST] [*]Your … | |
Re: Thanks for using code tags on your first post :) its not often that happends. Some of your indentation is a bit strange so I will fix that up, I also removed one warning to do with signed / unsigned comparisons. [CODE=CPLUSPLUS] #include <iostream> #include <string> #include <iomanip> #include <string.h> … | |
Re: This is pathetic, honestly. Instead of trying to pay people to do this simple task you could do in a couple of hours, show some effort and do it yourself. Remember we are only here to offer help, not to do it for you. | |
Re: To be honest, that didnt really help as all the indentation has been lost (assuming it was there in the first place) | |
Re: Yeh, thanks to [B]Ancient Dragon[/B] I think theres been some moments when I have had higher reputation than post count :) | |
Re: The forums don't update in realtime like the [B]Subscription Spy[/B]. It would be great if it did :) | |
Re: [B]muraliaa[/B], that has got to be one of the worst written codes ever, the indentation is all messed up, you havent used code tags, and you have your [B]void main[/B]. Also you havent added any files to include, so the functions [B]printf[/B], [B]getch[/B] and [B]clrscr[/B] are all undefined. I wouldent … | |
Re: Oh boy, where to start.. First, learn to use [B]code tags[/B], its not difficult. Give more details on your problem, and show the errors you are getting. Dont use [B]void main[/B]. Try posting this again, but this time.. properly and then I will help you with your problem. Read this … | |
Re: Pointing to a 2D array is just like pointing to a 1D array, all the pointer does it point to the very first element of the array. Heres an example that shows how you can point to multi-dimensional arrays by using pointers. [CODE=CPLUSPLUS] #include<iostream> using namespace std; void DisplayNums1D(int *nums, … | |
Re: Yes, use code tags, post specific question and errors if there are any, your not going to get much help unless you do. :icon_neutral: | |
Re: I suggest you change the structure of your code to look something more like this. Handle all key events and make them only change the velocity, not the actual sprite location. Then at the end, when you have done all the key event handling, then add the velocity to the … | |
Re: Its your choise if you want to include namespaces, but they are there for a reason, mainly for structuring your code and avoiding name confliction. Take this example: [CODE=CPLUSPLUS] #include <iostream> namespace A { int var = 10; }; namespace B { int var = 20; }; using namespace A; … | |
Re: [B]system()[/B] takes a char array (pointer) as an argument, if you want to run an application you could use this simple function. [CODE=CPLUSPLUS] void Run(char *app) { std::string command = "start "; command += app; system(command.c_str()); } [/CODE] Now to call that function it should look something like this. [CODE=CPLUSPLUS] … | |
Re: While your adding numbers to the array, just check if the array already has the value, if so, then try again. This seems to do the trick. [CODE=CPLUSPLUS] #include <iostream> using namespace std; int main() { int i, j, k, randomNumber[10]; for(i = 0; i < 10; i++) { randomNumber[i] … | |
Re: > Also, why use 3.14 when you already defined PI ? I get the feeling that he didn't write this code, and didn't take the time to look through it first to see what resources have already been given. If he did write the code, then im amazed that he … | |
Re: Stop posting in this thread o.0 its [B]4 years old[/B]. | |
Re: Try this: [CODE=CPP] #include<windows.h> #include<iostream> #define DebugMessage(str) OutputDebugString(str) int main() { DebugMessage("Hello"); std::cin.ignore(); return 0; } [/CODE] | |
Re: This sounds like a tricky project, for your first question, try looking up windows [URL="http://msdn.microsoft.com/en-us/library/ms644990.aspx"]hooks[/URL]. It is most lightly what your looking for. For your second quesion I think you have to scan through each child window, mabey by using [URL="http://msdn.microsoft.com/en-us/library/ms633494.aspx"]EnumChildWindows[/URL] with the web browser and somehow read each word, … | |
Re: Not saying you should use it, but one way is to remake the structure with the same variable types and sizes, but leave all the members public, heres an exmaple. [CODE=CPLUSPLUS] #include<iostream> using namespace std; class A { private: int a; public: A() { a = 10; } }; class … | |
Re: A few things you should add if your defining the function within the class. [CODE] [COLOR="Red"][B]friend[/B][/COLOR] ostream &operator<<(ostream &cout,MyClass [COLOR="Red"][B]&[/B][/COLOR]obj) { cout << "Output members here."; return cout; } [/CODE] | |
Re: If you want to find a name and display the telephone number you have to loop through each person in the address book and then use the [URL="http://www.cplusplus.com/reference/clibrary/cstring/strcmp.html"]strcmp[/URL] function which takes two char pointers as parameters and returns 0 if they match. It would look something similar to this: [CODE=CPLUSPLUS] … | |
Re: >I cannot get this string to store in the array appropriately. exactly what do you mean by this ?? whats going wrong ? :-/ | |
Hi everyone. Here is a program I made which will find patterns in a list of primes. It does this by finding the difference between each prime and adding them to a vector like this: [CODE] Primes: 2 3 5 7 11 13 ^ ^ ^ ^ ^ Difference: 1 … | |
Re: I had this problem many times, its not vista, you have to make sure that the program configuration is set to "Release" instead of "Debug". But I came across so many of these errors when using .NET and got tyred of it, so I stopped using it and have never … | |
Re: [QUOTE=CoolGamer48;654551] If you really want to know how to convert a string to an array: [CODE] char strarray[100]; string str = "Hello"; for(int i = 0;i < str.length();i++) strarray[i] = str[i]; [/CODE] [/QUOTE] This will work, but in future when copying variables like this from a vector, try to do … | |
Re: > 2. Pointers degrade reliability of C++ programs due to security issues I try to only use pointers when necessary, if your not going to be accessing others parts of the memory from that pointer, then simply use references. This will also make the code more readable. | |
Re: Try adding this: [CODE] case WM_LBUTTONDOWN: { float mx = 0;//mousex float my = 0;//mousey mx = LOWORD(lParam); my = HIWORD(lParam); [COLOR="Red"][B]POINT mp; mp.x = mx; mp.y = my; ScreenToClient(hwnd, &mp); mx = mp.x; my = mp.y;[/B][/COLOR] return (0); } [/CODE]For more information look [URL="http://msdn.microsoft.com/en-us/library/ms533179(VS.85).aspx"]here[/URL]. [I]edit: I just realised this … | |
Re: Something like this perhaps ? [CODE=CPP] #pragma comment(lib, "mylib.lib") [/CODE] | |
Re: Yes, windows tend to do that for alot of types, and sometimes theres no need for them, for example in one of the header files I found these: [CODE=CPP] #define CONST const typedef int INT; typedef float FLOAT; [/CODE] and hunderds more.. ;) | |
Re: funnily enough, I have just finished making the exact same thing :), take a look at it if you like, its pretey cool and allows you set set playback speeds & more. Hopefully I will also help you with your problem. My one saves all the data in pure binary, … | |
Re: This example will read each word from a file, allow you to make the changes you want, and then write them back. The only problem with this example is that all indentation and extra spaces will be lost. To do it properly, you will have to load the entire file … | |
Re: To use the [B]srand[/B] function with [B]time(0)[/B] you must include [B]<ctime>[/B]. Where as for the first one, I think you have to use a plain char array and then convert that to type [B]string[/B]. It would also help if you showed the errors MSV was giving. | |
|
The End.