5,676 Posted Topics

Member Avatar for Bumpehh

You'be been told before about [formatting your code](http://www.gidnetwork.com/b-38.html) properly.

Member Avatar for WaltP
0
122
Member Avatar for BlueDevil

NEVER use the word **urgent** in a forum. There is no urgency as far as we're concerned. And many people will simply ignore your post. And you need to be more specific than "*it doesn't work*". If you want help, and fast, the more we have to stare at 300 …

Member Avatar for deceptikon
0
212
Member Avatar for orar

Why is it so hard to **explain** what is wrong for you noobs? We are programmers, not psychics. **Tell us** what you need help with!

Member Avatar for np complete
0
207
Member Avatar for Nabiha Raza

And we're supposed to read 309 lines of uncommented, unformatted code and do what with it? Try adding more output statements at key places (top/bottom of functions, in loops) to pinpoint where the problem is. And [format your code](http://www.gidnetwork.com/b-38.html) properly. If I have to read it, I have to be …

Member Avatar for rubberman
0
241
Member Avatar for colombn4life

> I get a bunch of errors and dont really know what to do. Any suggestions? Sure. Fix them. The errors tell you what line number and what the problem is, so look there and correct it.

Member Avatar for WaltP
0
251
Member Avatar for Bumpehh
Re: dice

Don't apologize for sloppy coding. It only takes a minute or two to fix formatting. Why is it so many people think that seeding the random generator should be done immediately *before* calling `rand()`? Doesn't anyone read the info about how `srand()` works? Why do you have all those arrays …

Member Avatar for Bob
0
164
Member Avatar for addicted
Member Avatar for Bob
0
2K
Member Avatar for akashi

Actually, [formatting the code](http://www.gidnetwork.com/b-38.html) is the first step. The second step is fixing the compile errors.

Member Avatar for WaltP
0
327
Member Avatar for Zion_Chibi
Member Avatar for WaltP
0
475
Member Avatar for rob.brown.315080
Member Avatar for WaltP
0
203
Member Avatar for vougnne21
Member Avatar for precision_lawns

Start by opening the comiler's IDE. Then add `#include <iostream>`. You can continue from there.

Member Avatar for Yusuke00
0
948
Member Avatar for nagarjuna844

You have 2 questionable sections. All those strings are defined at least twice. You should make a master list of the strings and use when you need one, use an index into the master list array. By carefully designing the list, you *may* (not guaranteed) be able to make your …

Member Avatar for np complete
0
350
Member Avatar for MrHatchi87

Don't use `exit(0)`. Use `return 1`. I don't understand the problem you are having. The instructions you posted literally tells you all the code you need to use, most of the variable names and what they are for. The only thing you have to figure out is a) how many …

Member Avatar for WaltP
0
2K
Member Avatar for haqua

And [format your code](http://www.gidnetwork.com/b-38.html) properly so we can understand it.

Member Avatar for WaltP
0
3K
Member Avatar for anumiqbal

> When you want to enter a sentence ( that is spaces will be present ) , use fgets(). Don't you mean `cin.getline()`? This **is** C++...

Member Avatar for WaltP
0
131
Member Avatar for steveincolorado

Format your code properly with code tags and finish your [I]for [/I]statements (3 parameters, not 2) and repost... Then we have something readable to work with.

Member Avatar for maaz0088
0
399
Member Avatar for chris.vargas.773

> but i keep getting these errors in my program. What errors? I don't see any errors posted at all.

Member Avatar for Bob
0
314
Member Avatar for macdunk11

All you need to do is read the character and output the same vaoue in hex format. There are no calculations necessary. > This could all be horribly wrong because I have taken a lot of this from different forums and webpages all over the web. If anyone has any …

Member Avatar for WaltP
0
270
Member Avatar for poloblue

`for (int j = 0; j<strlen(tmpStr); j++)` Why are you going through *tmpStr*? Isn't that simply the string you used on input? It has no bearing on your word list once input is done.

Member Avatar for WaltP
0
210
Member Avatar for BoulderMen

The statement `if (!string || !*string || !isdigit(*string))` alone tells me you have no idea how to handle an array of characters. You need to read up on 'strings' and pointers to understand them. Then what you need to do should be clearer.

Member Avatar for WaltP
0
190
Member Avatar for celina1234

No. It needs to be in the project directory -- where the .EXE lives. Using `puts()` -- BRAVO!!! Finally someone who doesn't use `printf()` :o) Using `main()` -- Oops. `main()` is an *int*. Always.

Member Avatar for VatooVatoo
0
151
Member Avatar for bhavin.chavada

You can't read a string (%s) into a single char (*name[i]* and *pid[i]*). You need to define them both as 2D arrays, *names[Number of names][number of chars for each name]*

Member Avatar for deceptikon
0
147
Member Avatar for mferarri

> Does this mean that I have to find alternative functions to the ones mentioned in the book? No. You need to read closer. You should find that he provided code for these functons.

Member Avatar for mferarri
0
174
Member Avatar for np complete
Member Avatar for straylight

> The element I am assuming is the pivot point? No, it's not a pivot point. It's just a number you need to find. > Basically I am asked to find an element in a sorted array and that is it. What element? You don't seem to be looking for …

Member Avatar for Bob
0
208
Member Avatar for PikapikaPi

Yes we can, if you help us understand your difficulty. All it takes is a FOR statement and the % (modulus) operator.

Member Avatar for 2teez
0
183
Member Avatar for lovetwins01

[QUOTE=lovetwins01;385032]By the way, I'm still not sure if I followed the correct guidelines for piosting code. Please advise me if I have done something wrong. Thanks in advance.[/QUOTE] Nope. Problem 1: You didn't use CODE tags as the background of the input box advises. Also [url=http://www.daniweb.com/techtalkforums/announcement8-3.html]here[/url] Problem 2: [url=http://www.gidnetwork.com/b-38.html]Formatting code[/url] …

Member Avatar for krissybhabhie
0
2K
Member Avatar for squizzel

Where did you > "Implement a separate function to reverse the order of the array using call by reference. The input of this function should be two pointers (pointing to original array and reverse array). Without an attempt at this implementation, there's nothing to help with.

Member Avatar for WaltP
0
2K
Member Avatar for ShEeRMiLiTaNt

Look you the **is\*\*\*()** functions -- isalpha() isdigit() ispunct() etc... They are in the *ctype* (or *ctypes*, I can never remember) header

Member Avatar for ShEeRMiLiTaNt
0
129
Member Avatar for JanraeMendoza
Member Avatar for Krokcy

FYI, it would be easier to tell if the value was loaded properly if you print using HEX (%X) instead of integer (%u). Food for thought. > I have tried to make a chart of how the unsigned int should look at the end, if its wrong than my understanding …

Member Avatar for WaltP
0
203
Member Avatar for sruthi atluri
Member Avatar for nitin1
0
136
Member Avatar for equation
Member Avatar for rajat.sethi93

Where are you dividing? Just before those statements, output the values used to figure out the denominator. For example, for line 43, display **i** and **a[i][i]** Now figure out what that value *should* be and why it is zero.

Member Avatar for rajat.sethi93
0
208
Member Avatar for dadon1991

> Why bother with approximations? What is the purpose of inexactitude for this? It's obvious. 1) It's part of the assignment to get the grade 2) It shows a possible approximation of the temperature conversion 3) Teaches how to calculate a percentage error via program Many times there's more to …

Member Avatar for dadon1991
0
245
Member Avatar for jeets1892

> So,please tell me how do I store value of the first roll and compare it with the next move(s). I tried something, but it does not seem to work. The same way to do it with any value -- create a variable to store the first roll and use …

Member Avatar for WaltP
0
456
Member Avatar for equation

I don't understand. You rememberd the number of wins and losses, therefore you saved them somewhere. I think you need to explain in much more detail what you're confused about.

Member Avatar for WaltP
0
2K
Member Avatar for mayank.dyl
Member Avatar for soujanya.bhat.184

1) indent better so we can read the code easier. 3 to 4 spaces is normal. 2) print your code and grab another piece of paper and a pencil. 3) sit at your desk and start at the top of your code and start writing out all the variables (including …

Member Avatar for soujanya.bhat.184
0
171
Member Avatar for yehernpoh

> error C2676: binary '+=' : 'IloNumVar' does not define this operator Whatever **IloNumVar** is, you cannot do a **+=**. It's obviously not an integer.

Member Avatar for WaltP
0
176
Member Avatar for griselndria
Member Avatar for jeaninem71

I see 6 functions. Based on both your threads, it's time to dust off the: **[boilerplate_help_info]** 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 …

Member Avatar for np complete
0
336
Member Avatar for jeaninem71

Many of us ignore any posts with URGENT or ASAP. They indicate to us posters that think their problems are more wothy of help than others, and, to us, there is no urgency at all. But aside from that (don't do it again) you need to ask better questions. You …

Member Avatar for np complete
0
223
Member Avatar for jeets1892

Let me see if I understand this. Player 1 rolls the dice. -- If he win (7/11) game ends. -- If he looses (2) game ends. If neither, Player 2 rolls. They just keep passing the dice after one roll. Is that about it? Some current problems: 1) `srand()` can …

Member Avatar for jeets1892
0
2K
Member Avatar for poloblue

Now you know why you should use variable names that make sense. Just choosing random letters obviously have drawbacks.

Member Avatar for WaltP
0
170
Member Avatar for rotten69
Member Avatar for Tinnin

`for(string::const_iterator iter = s.begin(); iter != s.end(); ++iter)`What does this line do? `string::const_reverse_iterator rit = s.rbegin();` What does this line do? What do the variables defined (*iter, rit*) point to or indicate. Why make pointer to the characters? Why not generate subscripts and just use them?

Member Avatar for WaltP
0
156
Member Avatar for dreday92

> Can someone tell me why i get the error code "ISO C++ forbids comparison between pointer and integer" for lines 135 and 149 135 is `for( int i = 0; index < 12; i++)` 149 is `for( int i = 0; index < 12; i++)` You need to make …

Member Avatar for Geli19
0
173
Member Avatar for Nomi55

> Dani: Not just India. That's what I was taught to use too! How long ago was that?

Member Avatar for Nomi55
0
260

The End.