5,676 Posted Topics
Re: I would write a few test programs that manipulate bits so you can understand what bit-shifting, ANDing, and ORing is all about. Then when you understand these basic principals, go back to your program with your new understanding. | |
Re: [B]Dman01[/B]'s suggestion only works on a select few compilers, therefore is not a good solution. You need to read the input as a string of characters, test the characters to make sure they all all of the correct type, then either 1) show an error 2) convert to integer | |
Re: So what's the problem on that line? We can't read your mind. I see no problem at all. If that line is executed once, [B]Grade1[/B] contain -28. If that's what you see, that's what you should expect. Just to point out, when the you define your 'grades', the initial values … | |
Re: [url=http://www.gidnetwork.com/b-45.html]Here is another[/url] description you can read and maybe not understand. And if that's the case, you need more basic knowledge before you can understand the complexities of command-line parameters. | |
Re: Why does it matter? And if it does, ask the developers of [B]7zip[/B]. They are the ones that designed the program. | |
Re: [QUOTE=mnNewbie;]I need to basically rewrite grep command: method is suppose to take an exact string and an exact filename as the 2 arguments grep<string><filename> then it has to search through the file for the string and print out the "line" and the "line number" the string is in. example #grep … | |
Re: What value do you get when you "[I]take eof from the keyboard[/I]"? | |
Re: I know the MEMBER RULES you read mentioned CODE Tags. USE THEM! And when someone asks you for format your code, format your code! | |
Re: Why do you want to programatically move the mouse? Just call the mouse click events directly with the proper parameters. | |
Re: [QUOTE=jmrpjb;]I was in the community center - community feedback and I clicked on a link which was supposed to take me to forum rules but this is what I got: Invalid FAQ Item specified. If you followed a valid link, please notify the administrator[/quote] Clicking on [B]Member Rules[/B] at the … | |
Re: [QUOTE=Leaningnew;1722846]Can anyone please explain me about callback functions with examples?[/QUOTE] [url=http://lmgtfy.com/?q=c%2B%2B+callback+functions]Maybe this can help[/url] | |
Re: As [B]Narue[/B] said 2.5 years ago... :icon_rolleyes: | |
Re: [QUOTE=lucyaurora;]Any suggestions will be much appreciated /Any trolling will be much abused :)[/quote] And I'm wondering, as a moderator, just what kind of abuse you are thinking about? Remember the Member Rules. You can get banned by abusing others here... :icon_wink: | |
Re: Try [url=http://www.gidnetwork.com/b-38.html]formating the code[/url] and start using braces "[B]{}[/B]" And post problems you are having. Don't make us guess. | |
Re: [QUOTE=muse_squall08;]this are my coding ..what missing is delete function and loading function from menu ..i try to do it , but could not get a solution , [/quote] No you didn't. There is no delete function in the code at all. And for 'loading', what's [ICODE]readfile()[/ICODE] do? [QUOTE=muse_squall08;]... and the … | |
Re: Where is [iCODE]proxy()[/iCODE] defined? | |
Re: You need a second variable to keep track of the [B]i[/B] value when you find the highest. | |
Re: [QUOTE=Ancient Dragon;]Why did you write it in c++ if the requirement was to write it in C? [/QUOTE] My guess is he found the code on the web and didn't write a line of it... | |
Re: If you don't believe us, then write the program and remove all doubts. The easiest way to alleviate doubts is to try it and see what happens. | |
Re: 1) Write functions that do one thing and one thing only. In your case: -- 1 function to calculate and [I]return[/I] the perimeter. -- 1 function to calculate and [I]return[/I] the area. 2) [iCODE]main()[/iCODE] should contain a loop that -- reads a single triangle -- calculates the perimeter (by calling … | |
Re: As an example, here's a function that you pass in the name of a text box and highlight the contents. [CODE]Public Function selectTextBox(Ctl As Control) Ctl.SelStart = 0 Ctl.SelLength = Len(Ctl) End Function [/CODE] That should give you an idea how to pass in your combo box name. | |
Re: [B]i[/B] must be going out of bounds for the array [B]text[/B]. In your first code, why are you using [icode]new[/icode] to get [B]temp[/B] then you [icode]delete[/icode] [B]ret[/B]? | |
Re: I don't see any problem other than poorly formatted code. [url=http://www.gidnetwork.com/b-38.html]See this[/url] -- proper formatting usually helps find errors. Also, in case #3 you should add a break. If you add more CASEs and forget, you've got another error. | |
Re: Problem #1: After your first [icode]scanf()[/icode], the ENTER you typed is still in the input buffer, waiting for the next input. Your second [icode]scanf()[/icode] reads that ENTER. So the value is not 'y' nor 'n', so no message. Problem #2: And, as [B]zeroliken[/B] said, the variables [B]Y[/B] and [B]N[/B] have … | |
Re: Try it and find out. Report your findings. | |
Re: Sorry, I'm not reading code that isn't formatted. [url=http://www.gidnetwork.com/b-38.html]See this[/url]. | |
Re: [QUOTE=dinamit3;]Raisefamous you should see function and recursive implementation. Look how easy is recursive implementation : [CODE]double factorial (int n) { if(n==0) return 1; else return n*factorial(n-1); }[/CODE][/QUOTE] Look how easy a nonrecursive solution is: [QUOTE=NathanOliver;][code=c++] for (int i = 2, i <= number; i++) // loop through all of the … | |
Re: [QUOTE=The 42nd;]Hello. The title pretty much says it all. [/QUOTE] Don't use the title as part of your problem description. The title is only to evoke enough interest for us to click on the thread. Then it's forgotten... [QUOTE=The 42nd;]I would like to know if and how you can print … | |
Re: [QUOTE=gourav1;1718292]u r new to this site i think. u are not here to give us homework for us. do urself!![/QUOTE] And you must be new to this site too, otherwise you would know that leet speak is not to be used here. Makes you sound like a child, very unprofessional. | |
Re: Why are you decrementing then incrementing the loop counter in the FOR loop? You should not touch the loop counter... | |
Re: The answer to the poll is [B]terrible[/B]! How are we supposed to respond to "[I]how was the question?[/I]" Tasty? Needs salt? Entertaining? | |
Re: [QUOTE=Gregor007;]How do you redo the program to find numbers in the line (starting with -+0123456789) and insert the word NUMBER before these numbers (in the results file).[/QUOTE] Find each word Test the first character If -/+/digit then output the word NUMBER Output the word Repeat. | |
Re: Read a word [iCODE]fin >> word;[/iCODE] Increment counter [iCODE]numwords++;[/iCODE] | |
Re: And if you can't use [I]iomanip.h[/I] you can certainly use [iCODE]printf()[/iCODE]. It's still part of C++. | |
Re: Sounds like you might have your [iCODE]srand()[/iCODE] call in the wrong place. It should be called only once a the start of [iCODE]main()[/iCODE] | |
Re: What's wrong with the standard form: [CODE] int change (int k) { if (k==1) k=0; else k=1; return k; } [/CODE] | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: Yes we can. Problem is we're not all psychic so 1) we can't help you fix the code we can not see, nor 2) we can't answer questions that were not asked. | |
Re: [QUOTE=Assassin7893;]Guys, I'm actually almost done. Basically what I have to do is to read from file with a list of words, sort them alphabetically and write them into another file. [/quote] Sounds good so far. [QUOTE=Assassin7893;]I am almost done, but the only thing is, the assignment says that we shouldn't … ![]() | |
Re: There are no records in [I]the notepad[/I]. Notepad is a binary executable file -- a program. It contains no data. | |
Re: [QUOTE=Clinton Portis;]system("cls") is cheap and easy. just like my women.[/QUOTE] Easy, yes. Cheap, no. The 'work' needed to call the operating system, find and execute the [I]pause[/I] command, then exit the O/S and return to the program is more like a $1000 call girl. It works well, but is far … | |
Re: Look at your loop definition. Look at the code. Compare variables. Also, if you add [I]num[[B][/B]i][/I], [I]num2[[B][/B]i][/I], and [I]carry[/I], you get a value from 0 to 3. Look at your IFs to see if you do different things when you get 2. Or 1. etc. If you don't do different … | |
Re: Start at the main function and read the code a line at a time. When it calls a function, read through that function. What's not to understand about the procedure? | |
Re: mdiParent.cmdPrint.disable -- specify the form. | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … ![]() | |
Re: Instead of using [iCODE]fgets()[/iCODE], use a FOR loop to read [I]num[/I] numbers using [iCODE]scanf("%d"...)[/iCODE]. | |
Re: Looks like it. Do you have to do anything with line 6? | |
Re: [QUOTE=The 42nd;1712590]So, there's no one to help?[/QUOTE] Your code has no formatting so it's hard to follow. Your explanation makes no sense. All that "data" may be understandable to you, but it means nothing to us. I have no idea what [CODE]a1(operation)b1 resultingerror1(whose value depends on operation, but nevermind) . … | |
Re: Call [iCODE]computeSphere(r, &a, &v);[/iCODE] & will pass the address of the variable and the value can be changed in the function. |
The End.