- Strength to Increase Rep
- +16
- Strength to Decrease Rep
- -4
- Upvotes Received
- 619
- Posts with Upvotes
- 555
- Upvoting Members
- 232
- Downvotes Received
- 30
- Posts with Downvotes
- 21
- Downvoting Members
- 26
Scientist, engineer, elder statesman
- PC Specs
- i7, 6 gig laptop
2,045 Posted Topics
Re: Line 46, the first portion of the for loop statement doesn't do anything, you could move part of line 42 into that position and have [icode] for(int StringPointer = 0;WordsToAnalyze[StringPointer] != ' ';++StringPointer) [/icode] but that StringPointer variable will be destroyed after the loop completes since it's declared locally, so … | |
Re: Your do/while syntax is incorrect. It should be: [code] do{ }while(condition); [/code] You're going to have to nest some of these menus so do a brief sketch on a piece of paper as to how they should be laid out. | |
Re: [url]http://www.eskimo.com/~scs/readings/voidmain.960823.html[/url] Did you try Googling it at all? (I say this not trying to be a jerk, but you've had 4-5 questions that are things that could be easily answered on Google) | |
Re: To start down this road, check out [url]http://www.winprog.org/tutorial/[/url] (it's not going to answer your questions right away, but once you get going you'll understand what's going on). P.S. This thread is ancient. Sometimes better to let them rest and start a new one. | |
Re: [quote]Your program <snip> You should [/quote] That means you, not us. But seriously, show us what you have tried, don't just drop off your assignment. | |
Re: a^b is not a to the b power, it is (a XOR b) `int power = pow(a,b);` will work (of your functions and variables and the cmath functions many have the same name which can be confusing at best P.S. Please use code tags `//your code here` next time to … | |
Re: [code]if (x == 'y' || 'Y') [/code] is not correct [code]if(x=='y' || x=='Y') [/code] is. The first one is taking the OR of what amounts to two true entities (since 'y' and 'Y' are non-zero values) and comparing that to x. Same for the 'N' scenario. You should change your … | |
Re: The best way to seek help is to come with code (which you have done) and have [i]specific[/i] questions about particular sections of it. Saying "I need to add a receipt portion" dumps the responsibility into our lap. The first thing you don't need are these [icode]WinExec[/icode] statements. You have … | |
Re: Let me preface this by saying that I am not an expert in any of these fields but I have had some exposure to the underlying theory, so facts are AFAIK. Please pardon any textbookiness. The least common denominator is they all involve the solution of simultaneous differential equations (depending … | |
Re: A theoretical underpinning for all Windows software: [url]http://en.wikipedia.org/wiki/Stochastic_computing[/url] | |
Re: [quote=Excizted]You are using two headers which prevents me from compiling this code, as I don't have them[/quote] You can get the second one from BS's page (it's just a mishmash of #includes, template functions,etc)[url]http://www.stroustrup.com/Programming/std_lib_facilities.h[/url] stdafx is needed for precompiled headers. If the OP doesn't have anything listed in there, you … | |
Re: Unless you are doing something with real time OSes ([url]http://msdn.microsoft.com/en-us/library/ms838340(WinEmbedded.5).aspx[/url]), and even then it's impractical, it will be obsolete knowledge. inp/outp used to be great for interfacing with fixed address ISA cards. If you're interested in this kinda thing check out the DDK ([url]http://www.microsoft.com/whdc/devtools/wdk/default.mspx[/url]). Not to be a wet blanket … | |
Re: See: [URL="http://msdn.microsoft.com/en-us/library/h21280bw(VS.80).aspx"]http://msdn.microsoft.com/en-us/library/h21280bw(VS.80).aspx[/URL] For the implementations of \n and \r\n on different systems (Win vs. *nix, and others) see: [URL="http://en.wikipedia.org/wiki/Newline"]http://en.wikipedia.org/wiki/Newline[/URL] But basically, \b is a backspace and \r is carriage return | |
![]() | Re: A large part of the problem (I cannot speak for your algorithm as of yet because I haven't been able to compile it without forcing) is that the math.h functions have require signatures that for the most part are float and double (and definitely not int), for example pow has … |
Re: [QUOTE=hq1] 123456789012345678901234567890 Row 1 ***###***###*########*****#### Row 2 ####****#####***************## Row 3 **######*************#####**## Row 4 **######**************##****** Row 5 ********#####********######### Row 6 ###############*********###### Row 7 #######************########### Row 8 ***************##****######### Row 9 ##########*********#####****** Row 10 #****************############# Row 11 #************#######********## Row 12 #################*********###* Row 13 ###************########**##### Row 14 ############################## Row 15 ############################## okay so i … | |
| |
Re: I've seen the so-called obfuscators (google "C++ obfuscator") but I can't speak to their validity or effectiveness. A few I saw changed strings to their hex equivalent, but that will only get you so far. Is there a connection string you don't want your end users to see? I think … | |
![]() | Re: Your if statements should look more like this: (you must change the y<=X<= z statements but you don't absolutely have to have the else if, but it's more efficient if you don't have to go through a bunch of if statements) [code=c++] if ( comission <= 299 ) ++count1; else … |
Re: In your construct method add a null terminator to your string (so at the index after the last used space add '\0' then use a[i] ! = '\0' instead of a[i] !=0 ( = 0 might work, but I don't know for sure offhand). So essentially give your counting routine … | |
Re: Trace the code through with particular attention to changes on the original variables. | |
Re: You can use the function getchar() to pause for the user to hit a key. You can use an if statement with the modulus (%) operator to set how many lines you want before the user is prompted. For example 0 % 50 = 0, 50 % 50 = 0, … | |
Re: I have a couple of 8 bit Nintendos around but nothing compared to this. I technically have every computer but most of them are just mobos knocking around in a box somewhere. Ah, "one man's trash is...", well, another man's trash that's euphemistically called something else :D All the more … | |
Re: Please show us what you have so far. Take a look at this [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: [QUOTE=Clinton Portis]main() is prototyped to return an int, but returns nothing.[/QUOTE] Actually, that's ok according to the standard. A return of 0 is implied if none is specified. | |
Re: Some general things because this doesn't even compile (which I think you implied): Lines 40 and 44 of your driver program, you don't need to put the return type in front of them when calling your methods in main(). Wrap your header file in: [code] #ifndef P1_NAMESEARCH_H #define P1_NAMESEARCH_H //the … | |
Re: Take a look at an ASCII table: [url]http://web.cs.mun.ca/~michael/c/ascii-table.html[/url] how do the two cases relate? | |
Re: What steps have you taken in starting to solve the problem? Have you decided on how you will represent the board? Are you going to use classes? These are the things you need to think about and start sketching out on paper even before you begin. Write as much of … | |
Re: Double check it, but I think it amounts to an integer division (clock_t is usually a long int and I think the constant is an integer value). Cast one or both to float. EDIT: Edged out by the Code Goddess :) | |
Re: You need to call your function for those values... Passing (0,0) to A gives ____ ? | |
Re: [quote=Biker920] you know that are two sizes of floppies [/quote] There were 8" floppies too! (In all fairness I don't really remember them) I think the 5 1/4" were double sided by the era of the souped-up Apple IIe (but you still had to flip em). | |
Re: [QUOTE=didi00;1069345]I can see that BGI is not compatible with newer versions of Windows. So I've read in your forum that I can use dosbox, and I tried it only it finds many more errors like "cannot open math.h file" and so. Someone tried this methode?[/QUOTE] I've never tried it and … | |
Re: What type of image? You're going to need some kind of a library, regardless, as there's nothing in standard C++ that will open an image. | |
Re: Did you compile the code first (the little hammer in the toolbar)? Otherwise, see this thread to make sure you have the right compiler detected: [url]http://www.dynamicdrive.com/forums/showthread.php?t=25615[/url] | |
Re: textBox1.Enabled = [COLOR="Red"]![/COLOR]checkBox1.Checked; (using exclamation point) Try it like that for the effect that you want. | |
Re: Are you spamming up the boards, AD? It was pretty funny, though I never have to go through all of that effort to get hit by women with purses. It just comes naturally. | |
Re: [quote]can anybody teach me write this programme in c++???[/quote] Yes. Provided you come to the table with something more than a copy/paste job of your assignment. What have you tried? Which part is stumping you? Can you put together a program that does some of the functions? etc. | |
Re: See [URL="http://en.wikipedia.org/wiki/Taylor_series"]this[/URL] for a reference. The way you are expressing e^x is for the Taylor series centered around 0. There is a corrective factor of -a (so you substitute x-a for x in your equation) to get a better approximation for the series centered around a. I'm not sure how … | |
Re: Posters with such disregard for order probably won't read the sticky, either. I feel your pain, but the only solution to this one is mild electric shocks through the keyboard. | |
Re: Because argv[i] is a C-string, you have to use the methods in <cstring> (such as strcpy, strcmp) [code] char * pFilename = new char[strlen(argv[1])+1]; //room for null terminus '\0' strcpy(pFilename,argv[1]); //accomplishes what line 23 does [/code] | |
Re: Votes need to be spaced apart by 10(?) seconds. If you do it any more rapidly than that, you have to refresh the page. This is done to prevent scripts, bots, your sister, etc., from rapidly down or upvoting posts. | |
Re: You can either do it in the forms designer (drag the groupbox control over and place the other items inside of it), or you can do it programmatically [code] instantiate a new groupbox instantiate a new control of whatever type add it to the groupbox instantiate a new control of … | |
Re: Try escaping some " " and putting them in your path, so it treats it as if the filename was in quotes at the prompt: "java -jar \"/Users/User1/Desktop/Sample Java/Demo.jar\" "; If not try"java -jar /Users/User1/Desktop/Sample%20Java/Demo.jar "; but I'm not confident it will work (it will probably just insert the space … | |
Re: 1.) Select the Form1.h [Design] tab in your project 2.) Click once on Form1 itself 3.) Go to the Properties Window (by default on the right side, but if you can't see it go to View/Other Windows/Properties Window 4.) In the properties window go to the little lightning bolt on … | |
Re: I got two of 'em! (PMs) I knew one day a random woman would find my [i]profile[/i] on DaniWeb attractive! Mom was right, she [i]would[/i] like me for me. I guess better to get a PM from SpamGirl than from WaltP... | |
Re: [quote]I'm currently working on recoding all of DaniWeb from scratch [/quote] Editing for high rep users? ;) Just kidding, I know when to quit. ![]() | |
Re: Test the following line: [icode] printf("%d\n",1/3);[/icode] If you provide integers, an integer division will be performed. Use a cast to make the numerator, denominator, or both into doubles. | |
Re: The [icode] return 0; [/icode] is implicit and the std:: qualifier on cout means that you don't need the [icode] using namespace std;[/icode] line. | |
![]() | Re: All I know is that Yankee Doodle came to town riding on a pony. My guess is, it was a big pony, or he was a small man. I don't know about Washington's arrangements. [quote]I've lost 10 minutes of my life asking myself some pretty pointless questions. [/quote] Whatever it … |
Re: [quote] [code] (int A, int B, int C) //A is money, B is coupons, C is candybars [/code] [/quote] Allow me to stick my nose in here for a peripheral point, but there's one surefire way to make sure that someone reading your code knows what is money, what is … |
The End.