49,761 Topics
| |
I am learning C++ and having a problem with adding numbers in a [10][10] array. It reads the data from a file. I have the array set up and I have to add the numbers diagonally left and right. I have to add prj6[0][0] then prj6[1][1] then[2][2] and so forth. … | |
Hi, this is my first time posting here so I'm sorry if I post something wrong. I have an assignment for my class and I think I have done everything right, well except for this one error that's been killing me. I get this error for each function call when … | |
Hi guys, I'm planning to make a car game & for that I'll use Microsoft Visual C++ 2010 for programming, directX 10 for the graphics, & Nvidia PhysX engine for the physics. The problem is that I can't find any tutorial of directX and Nvidia PhysX, I only find of … | |
Hi all, So I'm currently teaching myself about hash tables. I'm doing a programming challenge where I create a hash table that stores instances of a class Person, with data members for name, phone number, and GPA. The table uses separate chaining to take care of collisions. The node I'm … | |
I have to create a program that requires the user to enter the zip code. The zip code must be 5 digits. I know how to do that using if statement and string.length(). What I don't know how to do is how to make sure the program only inputs and … | |
Can someone show me how to write a recursive function that count how many time the number 7 occur in an integer. Thanks | |
A program I'm trying to compile is simply not working right. I have everything defined the way it should with all the right #include statements there. However, anytime I try to compile with g++, it tells me the functions are undefined. Really, I should not be getting this error. I … | |
I am trying to create a queue class and then allow the user to input integers at the back of the queue and take them from the front. This is what I have so far, it runs but will not output the size of the queue correctly. Any help would … | |
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 … |
The End.