5,676 Posted Topics

Member Avatar for Graphix

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.

Member Avatar for rubberman
0
126
Member Avatar for kankaortiz

[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

Member Avatar for adityatandon
0
5K
Member Avatar for emaellie

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 …

Member Avatar for adityatandon
0
1K
Member Avatar for Srinivas0

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

Member Avatar for Srinivas0
0
189
Member Avatar for Sadun89

Why does it matter? And if it does, ask the developers of [B]7zip[/B]. They are the ones that designed the program.

Member Avatar for Sadun89
0
110
Member Avatar for Albion1
Member Avatar for mnNewbie

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

Member Avatar for WaltP
0
290
Member Avatar for tejaspandey
Member Avatar for Gaiety
0
148
Member Avatar for puneet2

I know the MEMBER RULES you read mentioned CODE Tags. USE THEM! And when someone asks you for format your code, format your code!

Member Avatar for hkdani
0
249
Member Avatar for martin11ph

Why do you want to programatically move the mouse? Just call the mouse click events directly with the proper parameters.

Member Avatar for jumba_4u
0
163
Member Avatar for Catweazle

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

Member Avatar for WaltP
3
1K
Member Avatar for Leaningnew

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

Member Avatar for WaltP
0
57
Member Avatar for Sushi
Member Avatar for WaltP
0
280
Member Avatar for lucyaurora

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

Member Avatar for LdaXy
0
467
Member Avatar for Fotis_13

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.

Member Avatar for Lerner
0
2K
Member Avatar for muse_squall08

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

Member Avatar for WaltP
0
2K
Member Avatar for webishop
Member Avatar for mc3330418

You need a second variable to keep track of the [B]i[/B] value when you find the highest.

Member Avatar for Ancient Dragon
0
72
Member Avatar for roona

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

Member Avatar for VernonDozier
0
242
Member Avatar for learner guy

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.

Member Avatar for Dman01
0
13K
Member Avatar for beckhris

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 …

Member Avatar for WaltP
0
3K
Member Avatar for Ole Raptor

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.

Member Avatar for ChrisPadgham
0
170
Member Avatar for Labdabeta

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

Member Avatar for mike_2000_17
0
241
Member Avatar for khanthegamer

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.

Member Avatar for PrimePackster
0
390
Member Avatar for bonett09

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 …

Member Avatar for WaltP
0
139
Member Avatar for Violet_82
Member Avatar for naz1234

Sorry, I'm not reading code that isn't formatted. [url=http://www.gidnetwork.com/b-38.html]See this[/url].

Member Avatar for naz1234
0
173
Member Avatar for Raisefamous

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

Member Avatar for WaltP
0
259
Member Avatar for The 42nd

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

Member Avatar for Narue
0
243
Member Avatar for kkmfazil

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

Member Avatar for gourav1
-1
192
Member Avatar for Vasthor

Why are you decrementing then incrementing the loop counter in the FOR loop? You should not touch the loop counter...

Member Avatar for Vasthor
0
247
Member Avatar for miss curious

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?

Member Avatar for WaltP
0
62
Member Avatar for Gregor007

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

Member Avatar for WaltP
0
160
Member Avatar for EvaL2ne

Read a word [iCODE]fin >> word;[/iCODE] Increment counter [iCODE]numwords++;[/iCODE]

Member Avatar for WaltP
0
318
Member Avatar for jeevsmyd

And if you can't use [I]iomanip.h[/I] you can certainly use [iCODE]printf()[/iCODE]. It's still part of C++.

Member Avatar for WaltP
0
178
Member Avatar for eskimo456

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]

Member Avatar for eskimo456
0
186
Member Avatar for tiredoy

What's wrong with the standard form: [CODE] int change (int k) { if (k==1) k=0; else k=1; return k; } [/CODE]

Member Avatar for WaltP
0
129
Member Avatar for ehmad.

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

Member Avatar for WaltP
0
732
Member Avatar for jankeifer

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.

Member Avatar for jankeifer
0
348
Member Avatar for Assassin7893

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

Member Avatar for v3ga
0
2K
Member Avatar for newbie26

There are no records in [I]the notepad[/I]. Notepad is a binary executable file -- a program. It contains no data.

Member Avatar for hkdani
0
124
Member Avatar for Akusa

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

Member Avatar for Schol-R-LEA
0
429
Member Avatar for emitremmit

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 …

Member Avatar for emitremmit
0
277
Member Avatar for venkat4krish

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?

Member Avatar for zeroliken
0
235
Member Avatar for Amiet Mhaske
Member Avatar for king_saqib

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

Member Avatar for gowans07
0
99
Member Avatar for asuprem

Instead of using [iCODE]fgets()[/iCODE], use a FOR loop to read [I]num[/I] numbers using [iCODE]scanf("%d"...)[/iCODE].

Member Avatar for asuprem
0
625
Member Avatar for MylesDBaker
Member Avatar for The 42nd

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

Member Avatar for zeroliken
0
133
Member Avatar for solid222

Call [iCODE]computeSphere(r, &a, &v);[/iCODE] & will pass the address of the variable and the value can be changed in the function.

Member Avatar for Moschops
0
155

The End.