49,755 Topics
![]() | |
Hello, I'm new here, so I hope I'll ask my question correctly. I have an assignment to create a "text-based cosmic adventure" and all went well until now. My project is separated into several header and implementation files. Problem arises only when I include certain file in another header file. … | |
Hi, I have a project to do for a C++ class that asks us to use a class termed "queue" to store some values (20/100/user defined) and allow the user to add/remove values. I'm sure it seems really basic, but I just can't get my code to display the class. … | |
I inherited an ancient C program that was a Windows console application. The application connects to a data source and returns some values to the console. A very simple application. I had to make some changes and recompiled the code under Visual Studio 2008 C++. It compiled, linked and ran … | |
Hey am new to programming. Totally new. I am at the present moment kinda clueless. I want to be able to write software, attractive, efficient, useful software. My life is currently a mess. I have no skills, no profession, no job and I am twenty two, soon to be twenty … | |
Hey there. I'm trying to figure out how to subtract one array of integers from another. I have figured out how to add 2 together going digit by digit and carrying over. I have no idea how to go about subtracting one from another. Basically i want to do simple … | |
![]() | topic is writing a program for a milk factory. in factor there are 4.000 liters of milk and costs 1$ per liter.there are 4 markets that buy milk from this factory and sell it.so... the program must be such... you enter which company u r,then enter how much u want...and … |
I have made a python program which will create an OpenGL and render a teapot (GLUT standard teapot) with a shader that I specify. The shader is specified as follows: [LIST] [*]I have a file called "index.ini" which contains the file paths to a vertex shader and pixel shader file … | |
Hi, I need some help with OpenGL and rotation. I have a 3D door surrounded by a holder. The holder needs to move with the door and rotate when it's not on the floor. After that the door must be able to open without affecting the holder. It's based on … | |
Hi I have a rather quick but very important question. I need to search a hash table for a value named element, whenever this value is found in the table, the search function should increase the counter for that element. My code is not working... any help is appreciated [code] … | |
hello guys... i am trying to make a dll in vc++. Now I need to use some private function in the dll so that they might do some work for other functions that are called by original application. Here is what I am trying to do [CODE] namespace MyDll { … | |
I am working on the last part of an encryption/decryption program and have to compare the original input file to the final output file character by character to ensure that they are identical. I have tried a few different ways to do this to no avail. When I tried this … | |
Hello everybody! I'm trying to create a class calling INT, that is equivalent to the type int. I really don't know exactly what're inside class int. What I know is int is a type. I think what I need to do is create a class with operators like: +, -, … | |
Hi everyone! I have problems in using pointer with reference. So, I make simple program to clarify them. First of all, this is my code and its output. Please notice line (*) and (**): My code: [CODE] //////////////////////////////////////////////////////////////////////////////////////// void RefFunc(int*& a){ int q = 888; a = &q; //PROPLEM HERE … | |
[B]Hej i am getting the error:[/B] [CODE]error C2440: 'initializing' : cannot convert from 'int *' to 'GarbagePointer<T>' 1> with 1> [ 1> T=int 1> ] 1> Constructor for class 'GarbagePointer<T>' is declared 'explicit' 1> with 1> [ 1> T=int 1> ][/CODE] -------------------------- But i really dont know how to either … | |
Hi i am trying to think of how the algorithm of how this question works but no matter how hard i tried, i cant think of it. Can anyone give me a hand?? Any help or tip would be greatly appreciated. Question: Given 3 classes, equilateral triangle, isosceles triangle and … | |
Hello all, I am enrolled in an intro to C++ class, and I need some help on our final program. Any suggestions are greatly appreciated, as I am quite new to this please don't criticize. Our program requirements require us to receive a command (I.E. delete) input as an array … | |
Ok so I have a game setup that allows the 8 to move around inside a small room. It works fine except that every keypress lags one "frame" behind. So whenever a key is pressed it does the last keypress that was given. How do I make it react immediately … | |
When we define an array, we have to declare its size before the program can be compiled. How can we specify it's size, say, by inputting a value from the user. I know a way with pointers; any other way? | |
How to make a fibonacci pragram..can u help me.? high = 1 ; low = 0 ------------------------ high = 1 ; low = 1 high = 2 ; low = 1 high = 3 ; low = 2 high = 5 ; low = 3 high = 8 ; low … | |
I am creating a program which includes converting numerical grades to letter grades but I'm stuck where I have to put a counter that counts number of letters. For example if 90-100=A and 90, 96, 87, 96 are entered, to count and display something like Number of As= 4 or … | |
How would you create a certain amount of objects based on user input? Like I have an enemy class and the player chooses how many enemies they want on the screen, how would I create those objects? Thanks | |
Ok well I got a final tomorrow and for the life of me I can not understand recursion. I have tried and tried and no hope lol. The professor gave us a study guide and I cant not figure out 2 problems. Just wondering if anyone can help me before … | |
I have some code that i need a press any key to continue command but when i put it in there it doesn't work, here's what i have: [CODE]cout << "Press any key to continue." << endl; cin.get(); [/CODE] can anyone tell me what im doing wrong? | |
I'm coding a game right now and everything works great that i want to have working right now, but there's a minor bug that i know of. this is that when the player enters their name, and the name has spaces, the code just closes. here's the part of code: … | |
I am trying to add three functions to this code so that I can add an entire list at one time to another list instead of having to add individual elements one at a time. Here is what I have so far but it is not working. [CODE]#ifndef LINKEDLIST_H #define … | |
Hi,I have an assignment that asks me to sort the words of a text (ascending) without duplicates being included. I manage to sort the words, but I just don't understand how to remove the duplicate words after being sorted. Here's my current progress : [CODE] // load a string vector … | |
Once again, I'm having trouble with my Sudoku Game. This is the last part and I'm almost there! I just need a little bit of help. According to the rules of Sudoku, there can only be once instance of each value in each column, row, and 3x3 grid. I'm writing … | |
What I have to do: I have to read numbers from a file input from the keyboard into an array, sort the numbers, and write the sorted numbers to a file. My problems are twofold: First, I don't know how big to make the array. When I try to write … | |
Hey guys I could really use some help here. In my program I need to ask the user for two 4 bit binary numbers . Then if they select add then add or if multiply then multiply. my problem is that I got the addition to work but the multiply … | |
I'm fairly new to C++. Can someone help me with a problem I'm stuck on? Below is a data file that has 3 fields in each record. I have to read the fields into a structure one record at a time. Any suggestions would be greatly appreciated. amazon.com 9250000 250 … |
The End.