921 Posted Topics
Re: From [URL="http://www.daniweb.com/forums/post861464-18.html"]this [/URL]post. [QUOTE]i promise here, with my own words, from now on, Narue is just another poster for me, i am not going to mention her, i am not going to PM her saying that Dilettante chocolates reminds me of her because i tent to associate every quality thing … | |
Re: I don't see why it should be so hard to post your own tutorials. Presumably it was posters with a low post count / bad reputation who flooded the tutorial section with bad tutorials. How about restricting the tutorial section for members with a certain amount of (useful) posts and … | |
Re: >i wish all the people all around the world spoke the same language. Well, that would just be plain boring. I find different languages interesting and enjoy learning them. Different languages seem to have their advantages, english seems to be a nice phonetic language which IMO has the nicest sounding … | |
Re: [QUOTE]In your main-function I encounter this line: while(flag==true) it's just the long way to write: while(flag)[/QUOTE]Saving a few extra keystrokes isn't worth sacrificing code readability. If the OP finds it more understandable, it's his choice. Generally I only give advice on formatting if it's actually unreadable to other programmers, or … | |
Re: A small game in flash AS2 which allows the user to create their own stages using a grid of different objects. Ill probably upload it to deviantart.com or something when i'm finished. Though I haven't done much recently as I have my exams now. A spanish speaking exam tomorrow which … | |
Re: > For some reason the (code=language) tags aren't working today, at least initially. Regular (code) tags are fine though. Just noticed that in this [thread](http://www.daniweb.com/forums/post859826.html#post859826). | |
Re: >That's the worst main function I've ever seen: void main() (reason) Seems just as bad as all the other [B]void main[/B]'s i've seen before :icon_wink: Either way, the code is bad. You are using outdated files like "iostream.h", "dos.h" and "graphics.h". There's no actual question. All I can say is … | |
Re: Split the problem into parts. If it were me, Id first make a function to convert a binary string to an integer, and then a second function to turn the fixed-point binary string into a [B]double[/B] type.[CODE=CPLUSPLUS]#include <iostream> int bin_to_int(char *binary) { // ... } double bin_to_double(char *binary_fixed_point) { // … | |
Re: I'm surprised it even compiles.[CODE=CPLUSPLUS]void is_valid (char& s) { return s=='1' || s=='2'; } void is_submenu(char& m) { return m=='x' || m=='y'; }[/CODE]Both these functions should be returning [ICODE]bool[/ICODE], not [ICODE]void[/ICODE] and there isn't really any need to reference the parameters either. | |
Re: Thats insane. It seems to me like the parents just want to screw up their childs life. Imagine going through highschool... being called Adolf Hitler, no chance of a girlfriend and very few friends - if any. In one of my classes, there is one person named James Bond, and … | |
Re: [QUOTE=marco93;861422]Use any of native Win32 comm. api to send mails[/QUOTE] What? try providing a link or example, this isn't helpful in the slightest. | |
Re: You can use the default copy constructor, like this:[CODE=CPLUSPLUS]struct myObject { int data[10]; }; int main() { myObject a; /* Do stuff to 'a' */ myObject b( a ); /* 'b' is identical to 'a' now */ return 0; }[/CODE] | |
Re: >Just a question though... I don't want to terminate only the function (so I don't want to use return), >but rather the whole program from within the function. How could I do that without exit()? Check for errors in the main function, and if one has occurred, close it from … | |
Re: >how do you manage to make all your threads so creepy So true :icon_rolleyes: Serkan, seek help to get over your Narue obsession. :icon_cheesygrin: or just keep it to yourself. | |
Re: Why would you want to hide a file in the system directory anyway? I wouldn't consider saving a file there any more 'hidden' than in the application data folder. If you don't have much information to store, you could alternatively add it to a registry key, however that may not … | |
Re: Same thing just happened to me, including my reputation. I just cleared all private data and restarted firefox. Not sure what caused the problem. | |
Re: This thread is out of control. To the OP: C++ was designed to allow the programmer to have nearly full control over what's happening in the program. Automatically assigning a pointer to NULL once it's been deleted is a waste of cpu, as once deleted, it's usually not used again … | |
Re: >My program must read a file and count how many times each letter comes up using vectors[27]. This seems like a faily simple problem, but why use vectors for this? You don't even need a [B]char2int[/B] function as conversion from [B]char[/B] to [B]int[/B] is automatic. Simply make an array of … | |
Hey, My problem is im not recieving instant email notifications anymore, it has just completely stopped for one moment to the next. All my settings seem to be ok and when a reply to a thread, under the [B]Thread Subscription[/B] it is set to [B]Instant email notification[/B]. Im not sure … | |
Re: Wow, that's a big prime :) It took my computer a few minutes to generate a 13/14 diget prime with a program I made, i'm curious how they discovered such a massive one. | |
Re: [QUOTE]> Edit:: C++ Beginner's Guide is also a very nice one (you can get a free legal ebook copy here) [/QUOTE]I bought that book before the age of 13, and was my first step to becoming the totally awesome programmer you see today :P | |
Re: >Help me with suitable code... We don't give away code. Start by posting code you wrote to show us that you've put some effort in, and explain your problem more clearly. | |
Re: Well depending on how you're outputting those values, this can be done in a few different ways. But if the values are c-strings before you output them, passing them to a simple function like this should work:[CODE=CPLUSPLUS]#include <stdio.h> void fixed_print(char *text, int minChars, char fill) { int i; for (i … | |
Re: Is it not possible to just close the other one as well?[CODE]System::Void exitToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { // Exit both windows [COLOR="Red"][B]myForm1->Close();[/B][/COLOR] this->Close(); }[/CODE] | |
Re: It's not surprising your program crashes, it's the same as making an array with a size of: 512 * 512 = 262144 elements, or 1048576 bytes. As Ancient Dragon said, you don't have enough stack space. >Do you think I would have the same problem if I use a vector … | |
Re: >I have got to say this .NET stuff is very frustrating. .NET is very simple compared to the amount of work needed to accomplish the same task in MFC or plain Win32 API. Post some code and the errors you are getting. | |
Re: >you see, words have meaning. they're funny like that. Haha :icon_razz: I found that post hilarious. | |
Re: >i have a problem in programming Pretty much every thread in this forum is based on a 'problem in programming', try to be more descriptive next time you make a new thread. >how can i know the right logical solutions for the problem after reading it ?? That didn't make … | |
Re: I haven't done Windows Forms for one or two years, but with the help of google... I managed to make this small example for you.[CODE=CPLUSPLUS]System::Void button_Click(System::Object^ sender, System::EventArgs^ e) { OpenFileDialog ^openFile = gcnew OpenFileDialog(); if ( openFile->ShowDialog() == Windows::Forms::DialogResult::OK ) { list->Items->Add( openFile->FileName ); } }[/CODE]Search better next time. | |
Re: Well there's your problem, read a tutorial on structures and data types and you'll find out what you've done wrong. [URL="http://www.cplusplus.com/doc/tutorial/"][Link][/URL] | |
Re: Something I heard, [B]"Life is too good and too short to waste on this filthy habbit, give it up, live a nice long life"[/B]. | |
Re: Waoh? I like that :icon_cheesygrin: [QUOTE] Your Brain Usage Profile: Auditory : 50% Visual : 50% Left : 50% Right : 50% William, you are one of those rare individuals who are perfectly "balanced" in both your hemispheric tendencies and your sensory learning preferences. However, there is both good news … | |
Re: I'm not entirely sure what it is you're trying to do, posting some code would help (or even a small example). Some other ways to simulate these events is to use [URL="http://msdn.microsoft.com/en-us/library/ms646260(VS.85).aspx"]mouse_event[/URL] and [URL="http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx"]keybd_event[/URL], as directly sending a message into a windows procedure can sometimes give you a different result … | |
Re: This question seems suspisiously similar to [URL="http://www.daniweb.com/forums/thread164824.html"]this[/URL] one? | |
Re: An example:[CODE=CPLUSPLUS]#include <windows.h> int main() { ShellExecute( NULL, NULL, "calc.exe", NULL, NULL, SW_SHOW ); }[/CODE] | |
Re: Yukk :icon_eek: I don't even like bacon, so I doubt i'd eat that. | |
Re: >i donno how it even works lol Did you even write the code? | |
Re: I think there's a special kind of windows hook for this. Look [URL="http://msdn.microsoft.com/en-us/library/ms644990(VS.85).aspx"][B]here[/B][/URL] for more information, though i'm not entirely sure, but it's worth a try. | |
Re: [URL="http://www.youtube.com/results?search_type=&search_query=C%2B%2B"]http://www.youtube.com/results?search_type=&search_query=C%2B%2B[/URL] | |
Re: Funnily enough, I don't see any question marks in that post. Oh well, it wouldn't make sense anyway. [URL="http://www.daniweb.com/forums/thread78223.html"]Read This Before Posting[/URL] | |
Re: With some tweaking, [B][URL="http://www.daniweb.com/code/snippet898.html"]this[/URL][/B] snippet should help. | |
Re: It's easy to read pixels, like with the [B]GetPixel[/B] function. But instead of reading each pixel individually, learn how to use [B]BitBlt[/B], to directly copy the window's entire device context to one you can use. | |
Re: Learn how to post. [B][URL="http://www.daniweb.com/forums/thread78223.html"]Link[/URL][/B] | |
Re: If you're using windows, it's best to start with a [URL="http://www.winprog.org/tutorial/"]Win32 API tutorial[/URL]. It eventually covers the topic of bitmaps, but considering you are new to the language, you may want to learns some of the basics before trying that tutorial. | |
Re: Don't go! :< Wait... how old is this thread? | |
Re: [QUOTE]Your personal information is at LOW RISK[/QUOTE]That's a relief ; ) | |
Re: Seems pretty simple to me, add this to the dialog message procedure, and windows shouldn't handle the ALT-F4.[CODE=CPLUSPLUS]case WM_SYSKEYDOWN: break;[/CODE] |
The End.