137 Posted Topics
Re: This function isn't doing anything: [CODE] double diameter(double diam) { double d ; while (d = 2 * radius ) return d ; }[/CODE] You're passing in the radius, not the diameter, so your function argument should be named to reflect this. Also, you're not using the value that you're … | |
Re: Wait.....what? What do you mean? You want to do what in functions? Call a separate function to read in the input and a function to perform the math? A separate function for each arithmetic operation? You only want to have variable declarations and function calls in your main()? | |
Re: Did you [URL="http://support.microsoft.com/kb/315265"]chkdsk[/URL] it? | |
Re: Needing vista to use those functions is BS. The functions without Ex at the end are windows 3.1 (and above) compatible and the ones with Ex at the end are Win32 compatible. Why are you using the Win32 function to set the value, but the Windows 3.1 function to open … | |
Re: I wouldn't be so sure that it's duster gunk. The only thing spraying it upside-down should really get on it is the propellant (C02 ?), which should just freeze it and then evaporate. My concern would be that one of the electrolytic capacitors went south and leaked it's goo everywhere … | |
Re: [quote]gamex.cpp(31) : error C2065: 'GetConsoleWindow' : undeclared identifier gamex.cpp(31) : error C2440: 'initializing' : cannot convert from 'int' to 'struct HWND__ *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast gamex.cpp(185) : error C2374: 'x' : redefinition; multiple initialization gamex.cpp(178) : see declaration of … | |
Hi all. Bear with me, I promise this will be hardware related in a minute... I'm working on a project for which I need to generate some FSK. I'm doing so by using a sin(...) function to calculate the values along the wave for N periods of frequency A and … | |
Re: Your thread is nearly unreadable. Please use code tags to post code. click the code button in the editor and put your code between the opening and closing code tags that it inserts into your post. | |
Re: First, join ACM. If you're currently a student then you can qualify for the student membership rate, which is really cheap. You'll get loads of books and online courses to help you learn all sorts of programming topics. In just about any field anymore you can probably get a decent … | |
Re: Hmmm...we need one of those readme stickies in the java forum like in the c++ one about not doing peoples' homework for them. :) Here are two papers with linear time algorithms for finding majority elements. [url]http://people.cis.ksu.edu/~subbu/Papers/Majority%20Element.pdf[/url] [url]http://placementsindia.blogspot.com/2007/09/majority-element.html[/url] | |
Re: Check the input immediately after reading it in and break out of the while loop right there if it's -1. ETA: Or, rather, return immediately...I wasn't paying attention to where you do the calculations. ETA2: You'll also have to make a flag to tell if you've read in any good … | |
Re: Good eye, dkalita. In other words, OP, you need to either only display the values (save to an int and output that int) or, if you want to keep all the squared and cubed values, you'll need to store them in square_array and cube_array. | |
Re: You need to move your if/else inside of your while loop. Unless the first input is -1, you're just going to keep doing this over and over and over: [CODE]Number[i] = Input; Count++;[/CODE] because Input will never change from the first input and it won't stop executing the while loop … | |
Re: Edit: oops, never mind. Is there a way to delete my own post? | |
Re: Please use code tags when posting code. That's really hard to read. | |
Re: You want something like the Linksys WCG200-RM, NETGEAR DGN2000, or NETGEAR DG834G. They are combination cable/DSL modems plus routers. I don't think the one you posted will cut it. | |
Re: [QUOTE=plague;1037957]how hard is it to make your own UTP cabling and how easy is it to mess up the cable? can a faulty cable be hazardess or harmful if not constructed properly[/QUOTE] Pretty easy to make. [URL="http://www.ertyu.org/steven_nikkel/ethernetcables.html"]here[/URL] are some instructions and [URL="http://www.amazon.com/Belkin-RJ45-Medium-Duty-Crimp/dp/B00004Z62S"]here[/URL] is a RJ45 crimper. Unless you're doing something … | |
Re: [QUOTE=isralruval;1048319]how would i write a function that parses a hex number as a string into a decimal integer? the following header should be: int parseHex(const string &hexString)[/QUOTE] You could use an atoi(...) type function to convert it to an integer, then you can output it in whatever number base you … | |
Re: You'll also need to include "vfw.h" and Vfw32.lib must be added to project link input Object/Library modules [CODE] CString m_Path = locAUD; // path to sound HWND m_Video = NULL; if(m_Video == NULL) m_Video = MCIWndCreate(this->GetSafeHwnd(), AfxGetInstanceHandle(), WS_CHILD | WS_VISIBLE|MCIWNDF_NOMENU,m_Path); else MCIWndHome(m_Video); MCIWndPlay(m_Video); [/CODE] | |
Re: I took the easy way out and used [URL="http://www.blat.net/"]blat[/URL]. Is that an option for you? | |
Re: You should be able to install the OS and use magic jellybean (has to be an older copy, they removed that functionality) to change the key. I believe MS even has their own key changer software which is supposed to be more robust than the Magic Jellybean one (which is … | |
Re: What? If I understand you correctly, you have to capture "count" when you set the min and max values. | |
Re: Looks like prince is a string and you're comparing it to a character? Use double quotes rather than single quotes. That was keeping it from compiling; was that all you wanted help with, or did you need help with the logic also? | |
Re: If you can read them in OK, then you can just do the math on them to get the values. Do you understand how different number bases work? Each of those 32 bit strings is just representative of a power of two i.e. 2^x where x is the place of … | |
Re: [URL="http://www.cplusplus.com/doc/tutorial/templates/"]http://www.cplusplus.com/doc/tutorial/templates/[/URL] [URL="http://en.wikipedia.org/wiki/Template_(programming)"]http://en.wikipedia.org/wiki/Template_(programming)[/URL] Check these out. They're a little bit of both (explanations/examples). Also, consider joining the ACM. Their online bookshelf and online courses should have tons of information on just about every topic, including this one. Consider swinging by a book store and picking up some C++ textbooks. Some of … | |
| |
Re: Well, when you go to a YouTube video, it has the code for embedding the video into a webpage. That could be a useful starting point. [CODE]<object width="425" height="344"> <param name="movie" value="http://www.youtube.com/v/NiEUMTT5TxY&hl=en_US&fs=1&"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/NiEUMTT5TxY&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed> </object>[/CODE] | |
Re: brute force. Once you have your list of prime numbers: For each prime number less than the user defined number, add it to each of the other prime numbers in your list. If the result of that comparison is equal to the user defined number, keep that pair. Seems pretty … | |
Re: [QUOTE=j34;1043282]how do you transfer text from a text box on one to another on a diferent page of html program. text is name,phone,address ond so on[/QUOTE] How do you mean? You just want to pass information from a form on one page to another page which will use that information? … | |
Re: Which flavor of c++ are you using? I use VC++ for work and I use the [URL="http://msdn.microsoft.com/en-us/library/eyxcxazf(VS.80).aspx"]MakeLower()[/URL] function on strings. Also, [URL="http://www.dreamincode.net/forums/index.php?showtopic=128289&hl="]here's[/URL] a dreamincode thread about a similar issue. | |
Re: [QUOTE=orangejediman;1045057]the beep function is in the 'windows.h' library[/QUOTE] Well, it's in winbase.h, but you want to include windows.h to be able to use it. [url]http://msdn.microsoft.com/en-us/library/ms679277(VS.85).aspx[/url] Also, be aware that Beep(...) can behave differently on different machines. On some machines it will only come from an onboard speaker (if present), on … | |
Re: Check out DigiKey (or other sellers, I suppose) for the Vapor Bearing fans from Sunon. They don't cost too much and they're really quiet, reliable and move a lot of air. | |
Re: Is this solved yet? Is it a PS/2 mouse or USB? If it's USB, does it pop up as an unknown device or anything like that? Do you have drivers for it that you should install first (these usually just add additional functionality though rather than being necessary for normal … | |
Re: [QUOTE=musden49;1037353]I was given an E-Machine with a ASUS motherboard (P4S533-MX). The computer will not power up and the green stand by light is on as long as the cord is plugged in. I tried clearing the CMOS. I put a new tested power supply and unplugged the CD Rom. Only … | |
Re: This thread give some solutions for tokenizing strings: [url]http://www.daniweb.com/forums/thread27905.html[/url] That's what you want to do in your first question. There are lots of ways to pull tokens out of strings. Secondly, you want to study up on some lex and yacc, a lexical analyzer and a parser, respectively. [url]http://luv.asn.au/overheads/lex_yacc/index.html[/url] | |
I am writing a program which should output some frequency shift keyed (FSK) audio. I am using a sin(...) function to find some values to plug into an array of unsigned ints which I am outputting using waveOutWrite with a sample rate of 44100 specified in the header. The values … | |
Re: [QUOTE=tk sailo;1039990]hello, Can someone tell me how to put favicon and site name on the address bar with colored background on firefox like google.com? thanks in advance.[/QUOTE] Dropping an icon file (16x16 ?) called favicon.ico into your main directory should get you the favicon. I thought that the colored business … |
The End.