thanks for all the suggestions.
JoshR I tried your method for doing the circular right shift but it didn't work as expected because of the data type being char therefore, the numbers weren't...
Type: Posts; User: goron350
thanks for all the suggestions.
JoshR I tried your method for doing the circular right shift but it didn't work as expected because of the data type being char therefore, the numbers weren't...
You're absolutely right 7stud. All that does is shift to the right by the specified number. It does not wrap it around. I'll need to use some kind of other formula then as I suspected all along to...
OK I've modified the code so that now the binary conversion and flipping works but now I'm having problems getting the wrapping part for the right circular shift to work.
In my example, binary:...
Ok Zach but how can I change that? Do I need to make the values char instead of int or long? I am finding it very confusing as to exactly how you get the values in binary form and with 32 bits...
Next thing I want to do is to right circular shift the bits of the inverted (flipped) number so that if it is shifted 2 bits to the right then the binary number 00000111 (decimal 7) would become...
Hi everyone,
I'm having problems getting a flipped binary number (one where all the 1's of a number become 0's and vice versa) to display correctly. My program converts a value from decimal to...
Hi again everyone,
I am getting close to completing this shapes program but now I am trying to chain to the base class so that all the shapes can get at the colour data member to randomize the...
I am trying now to chain to the base class so that all the shapes can get at the colour data member to randomize the colours of each shape pressed by the user. How can I chain to the base class from...
Dave, There is a rectangle function in the winbgim graphics library that draws a rectangle based on the four parameters(x position, y position, length and width) and that is what I used in the Draw()...
Here is the error:
all errors are on the Rectangle *r... line:
Compiler error text:
'r' undeclared (first use this function)
(Each identifier is reported only once for each function it...
Thanks for the suggestions dwks and I wish I could report that the '=0' being included in the virtual functions definitions was the problem with 'r' being undeclared but it wasn't.
I'm still...
Hi everyone,
I am doing a Windows BGI graphics program with C++ that randomly draws different types of shapes on the screen and calculates the area of each shape and displays the area inside the...
Here's a question I have. If you know the answer, drop a reply.
Would I be able to use an overloaded operator(+) method instead of the additem() method to add a node to the linked list?
Thanks.
Thanks for the suggestions.
I'm pretty busy at the moment with other things so I may not get a chance to try anything with the program tonight but I will get to it tomorrow.
Thanks.
Hi everyone,
I am trying to write a program involving adding nodes to a single linked list and allowing the user to enter the names of students and the student numbers up to as many as they wish....
Hi everyone,
My program which involves Inheritance is crashing and I think it has to do with the destructors which are making it crash. Me and a few other people are having the same problem with...
Is there anyone here that is good with Windows BGI graphics within C++? I realize it's a terribly old standard, outdated and rarely used but I've been forced to in this case. I am trying to draw a...
How can I convert a variable from a float to char? I know of atoi for char to int but I'm hoping there is one for float to char.
OK, the sorting works with that method and I'm pretty sure that is the only way it can be done. Is that true?
Another question I have is that I need to integrate this program with the original and...
Hi everyone,
I have a program where I need to print the values of an array of float values. Then I must sort the array and print the sorted values and THEN print the original values again.
I...
Alright I'm close to getting the right solution for deleting a record from a file. It is finding the file to delete but instead of completely getting rid of the record and not seeing it anymore, it...
What is file-mapping and how is it done?
I'm having some trouble understanding what I have to code for removing a product record from the file (having all it's field information be deleted). The code that I currently have for that section...
I'm having some trouble understanding what I have to code for removing a product record from the file (having all it's field information be deleted). The code that I currently have for that section...
Is it a good practice to use cin.ignore() every time you use cin to get user input? That's what I'm doing in this program.
I had problems with previous programs due to not including that after the...