Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
90% Quality Score
Upvotes Received
9
Posts with Upvotes
9
Upvoting Members
8
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
~24.9K People Reached
About Me

Your best friend.

Interests
AI, sleeping, American comics, Japanese animation, football (soccer), video games, and hard rock music.
PC Specs
Macbook Pro 4,1 Mac OSX: Snow Leopard, Windows 7 Professional
Favorite Tags
Member Avatar for LostnC

As mentioned, you were trying to assign an integer to a pointer rather than dereferencing the pointer to store the value.

Member Avatar for deceptikon
0
3K
Member Avatar for asad393

@Gonbe: Why'd you give out an answer? This seems like an assignment, so why not let him/her do the work themselves and post it here if they need additional help?

Member Avatar for Gonbe
0
349
Member Avatar for C++newbie chick

You only set mid once, and that was outside of any loop, so it doesn't update when last or first changes.

Member Avatar for C++newbie chick
0
2K
Member Avatar for Mopikope

Why not use a list of strings rather than a character array? The list class is made for fast insertion and deletion, without you having to worry about shifting values continually.

Member Avatar for Mopikope
0
124
Member Avatar for itzcarol

Your asking the user to enter a grade, then testing the array's data before they even enter any information. Once you declare your array, its data is going to be garbage, so that's what you'll be testing against.

Member Avatar for Labdabeta
0
4K
Member Avatar for dakerao

[QUOTE=NathanOliver;1682830]So in your example a and b are both 10. You add them together and you get 20. Now you want to set a and b to 20 and do it again?[/QUOTE] I think it's more on the line of adding the result of a + b to a + …

Member Avatar for Chilton
0
211
Member Avatar for Vasthor

You have to set c to 0, because it needs to increment until it counts the amount of characters in cols. When it reaches that amount, then you've finished printing one line. As for c += greeting.size();, c is incremented by the amount of the "greeting" since in the previous …

Member Avatar for Vasthor
0
454
Member Avatar for stevo7624
Member Avatar for raptr_dflo
0
130
Member Avatar for cummings15

You could always just test for the student with the longest name, and find the difference in spacing between that name and every other name. In doing so, you can print the correct amount of spaces after each person's name, followed by the list of grades. Good luck. P.S. I'm …

Member Avatar for raptr_dflo
0
147
Member Avatar for New4lyfe

It seems like most of the work is already done. Make some attempt at the code, post it, and we'll give assistance if need be.

Member Avatar for New4lyfe
0
184
Member Avatar for ronthedon

InitWord[50] is invalid, in this case, since your array is actually from 0-49. Also, if you want to copy the word to the struct member, you can use strcpy. Lastly, if you're trying to pass that array to InsertItem, then you'd need to pass a pointer to it and the …

Member Avatar for vidit_X
0
212
Member Avatar for Sunshine2011

There is no pAVec member in your class, and neither was one passed to the member function test.

Member Avatar for Sunshine2011
0
119
Member Avatar for valestrom
Member Avatar for Clinton Portis
0
248
Member Avatar for CrazyMisho

If your list is generic, then you wouldn't necessarily need to specify the particular class object would you? What do you have there that is a substitute for the name of a type?

Member Avatar for Chilton
0
142
Member Avatar for johnnyboyslim

It means that the variable direction is default initialized with the character 'A', if you don't pass a character as an argument to the function. If you do, it replaces that value with the one the caller (you) provided.

Member Avatar for Chilton
0
61
Member Avatar for Adam Ma
Member Avatar for cherrymae.calma
0
166
Member Avatar for robdb

Your string and list are empty when you test for their size. Also, you've only opened the file. Where did you read from it?

Member Avatar for raptr_dflo
0
525
Member Avatar for maria536

There's a semi-colon after your string. Remove it. Also, separate your variables in output by << operators and not semi-colons.

Member Avatar for maria536
0
188
Member Avatar for sandman64

Your code tags isn't structured properly. Also, I'll give a hint. Work it out by hand first. Assume the first population is 755, for instance, and using what you know about the arithmetic operators, find a way to round to 1000. By finding it for this case, you can work …

Member Avatar for Chilton
0
187
Member Avatar for oscargrower11

In your catch statement, you referred to e but you never used it. Instead of [CODE]cout << "exception handled" << endl;[/CODE] try [CODE]cout << e.what() << endl;[/CODE] That should display the error string that you threw. If you want to specify it as an error, you could use cerr instead …

Member Avatar for oscargrower11
0
164
Member Avatar for DrShroom
Member Avatar for PaulProgramer

You could use an associative container, such as a map, that has unique key values (in your case integers). The container is self-ordering, so by testing the difference between each successive key value (integer), you can find out which integer you'd need to search for next if their difference isn't …

Member Avatar for PaulProgramer
0
219
Member Avatar for efigen

You should pick a better name for your string other than "string", just to be safe. Aside from that, you're indexing your string so each index corresponds to a specific character, in the case of string[7] it'll be 5 and string[8] will be *. If you want 45, you can …

Member Avatar for WaltP
0
99
Member Avatar for aspirewire

In your example, you're neglecting to test if the die rolls on a 6 in your if statement. Also, rather than using [CODE]num < 6 && num > 0[/CODE], try: [CODE]if ((num >= 1) && (num <= 6)) { // rolls on a correct die value }[/CODE] Also, keep in …

Member Avatar for WaltP
0
128
Member Avatar for skiboy209
Member Avatar for raptr_dflo
0
184
Member Avatar for jashbela
Member Avatar for rdhc1330

Make an attempt before asking for help, or ask questions about the language details, so you can get a better understanding.

Member Avatar for mike_2000_17
0
823
Member Avatar for Mark198995

Review the link that was posted before to get a better handling on loops, then try doing your program again.

Member Avatar for Mark198995
0
150
Member Avatar for skorm909

There's some syntax problems with your program that you should handle beforehand. In each of your condition statements, make sure you're using == signifying equals rather than = meaning assignment. Also, cout uses the ostream operator << whereas cin uses the istream operator >>. In addition, it's "cin.get()" rather than …

Member Avatar for raptr_dflo
0
143
Member Avatar for evilguyme

If you're trying to pass the array to the function, you should just pass the name of the array "levelOnePlatform" as the first argument and 50, as the second argument which is its size.

Member Avatar for evilguyme
0
88