137 Posted Topics

Member Avatar for guccitan88

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 …

Member Avatar for guccitan88
0
104
Member Avatar for maverick405

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()?

Member Avatar for mrnutty
1
121
Member Avatar for seif1364
Member Avatar for donaldw
0
31
Member Avatar for brando|away

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 …

Member Avatar for donaldw
0
257
Member Avatar for kaiking328

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 …

Member Avatar for Bob_180_Bob
0
97
Member Avatar for restrictment

[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 …

Member Avatar for restrictment
1
360
Member Avatar for donaldw

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 …

Member Avatar for donaldw
0
153
Member Avatar for saadismail85

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.

Member Avatar for masijade
-1
161
Member Avatar for squigworm

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 …

Member Avatar for squigworm
0
106
Member Avatar for ronny22

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]

Member Avatar for ronny22
0
94
Member Avatar for infern0

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 …

Member Avatar for pecet
0
118
Member Avatar for maverick405

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.

Member Avatar for mrnutty
0
141
Member Avatar for tolby99

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 …

Member Avatar for donaldw
0
131
Member Avatar for kent01981
Member Avatar for bpt0004
Member Avatar for Anpippin

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.

Member Avatar for donaldw
0
127
Member Avatar for plague

[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 …

Member Avatar for jbennet
0
137
Member Avatar for isralruval

[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 …

Member Avatar for donaldw
0
540
Member Avatar for restrictment

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]

Member Avatar for restrictment
0
396
Member Avatar for debasishgang7

I took the easy way out and used [URL="http://www.blat.net/"]blat[/URL]. Is that an option for you?

Member Avatar for rahul8590
1
131
Member Avatar for busna

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 …

Member Avatar for jbennet
1
668
Member Avatar for jigglymig

What? If I understand you correctly, you have to capture "count" when you set the min and max values.

Member Avatar for donaldw
1
123
Member Avatar for msc1004

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?

Member Avatar for donaldw
1
92
Member Avatar for yatman

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 …

Member Avatar for donaldw
0
384
Member Avatar for tkud
Re: 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 …

Member Avatar for mrnutty
1
82
Member Avatar for GordonUK
Member Avatar for througheye

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]

Member Avatar for donaldw
0
101
Member Avatar for Ashishinani1756

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 …

Member Avatar for donaldw
0
94
Member Avatar for j34

[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? …

Member Avatar for donaldw
0
126
Member Avatar for alexa868

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.

Member Avatar for VernonDozier
0
188
Member Avatar for kavithabhaskar

[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 …

Member Avatar for donaldw
0
3K
Member Avatar for DSOS

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.

Member Avatar for donaldw
0
1K
Member Avatar for monjes

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 …

Member Avatar for donaldw
0
105
Member Avatar for musden49

[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 …

Member Avatar for donaldw
0
103
Member Avatar for mebob

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]

Member Avatar for mebob
0
102
Member Avatar for donaldw

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 …

Member Avatar for donaldw
0
513
Member Avatar for tk sailo

[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 …

Member Avatar for donaldw
0
144

The End.