49,757 Topics
| |
The assignment is to write a computer program that will add 1/3 to itself a large number of times and to compare the result to multiplying 1/3 by the number of times 1/3 was added to itself. It is also to do the same thing with ½.The program is to … | |
Good Day all! Looking for a little help here. I have to open a file containing a few words, some of which ending in "ed" and print the only the words ending in "ed" back to file. Here is what I have so far. I cannot seem to open the … | |
A text file, grades.txt, contains data pertaining to student grades. Each line consists of: student number,course mark1, course mark2, course mark3, course mark4 The last line contains a student number 0 to indicate the end of the data. Write a C program to print a grade report, as outlined below, … | |
Hello, I need to wwrite a function that will go through a dynamic character array that the user inputs then take it and delete the repeated characters. My program partially works but it seems as though whenever it deletes a set of repeated characters then it just stops rather than … | |
OpenGL GLUT **My question is at the end of this topic** 1) a) Use your logo you drew within a world coordinate space that has 0,0 at the center. You may choose any width and height for your world coordinate space, glut window and viewport. Be sure that you separate … | |
I'm fairly new to C++ and my professor gave me most of the code to start with. I'm supposed to write a program that uses the add_day(int n) function I wrote in Chrono.cpp. There must be a problem with the **Chrono::Date add_day(int n);** line. Here is the error: hw4pr2.obj : … | |
Hi sorry for yet another circular inclusion problem but I need help understanding why I cant add a new class CSprite to my project that inherits CShape. I get an error C2504 base class is undefined. I've tried so many permutations of including files. Also can anyone suggest a neater/efficient/correct … | |
Ackermann's function is a recursive mathematical algorithm that can be used to test how well a computer performs recursion. Write a function A(m,n) that solves Ackermann's function. Use the following logic in your function: If m=0 then return n+1 If n=0 then return A(m-1,1) Otherwise, return A(m-1, A(m, n-1)) Test … | |
So im having issues with a sorted list template, heres how I implemented it enum RelationType {LESS, EQUAL, GREATER}; template<class ItemType> struct NodeType { ItemType info; NodeType<ItemType>* next; }; template<class ItemType> class SortedType { public: SortedType(); ~SortedType(); bool IsFull() const; int GetLength() const; void MakeEmpty(); ItemType GetItem(ItemType item, bool& found); … | |
I need to write a program that takes in two big integers from the user and puts them into a dynamic array so that we can add them together. It says to use "paper-and-pencil" mehtod meaning to pretty much reverse the dynamic arrays and carry the ones over as you … | |
My program will process the first and second line of the text file but gets a bit crazy after that. Lines 1, 2, 3, and 5 are supposed to match and line 4 does not. It gets lines 1 and 2 but 3 and 5 are incorrect and it processes … | |
This is the problem. The program works in the first run. but after you enter a key and proceed for another entry, it skips the "LAST NAME:" line and directly asks for the "FIRST NAME" line. i can't find the problem in the code so...help! >.< (skip forms and frames … | |
I need help with my code, i can't figure it out by myself. If someone can do it for me, I CAN PAY but be reasonable. You can email me at desi_jatt92@yahoo.com This is the question You can assume the name of the month will be typed in with the … | |
well i have to make one and before i make i wont to know what it is and what is the order the number come out random or like 1 12 123 1234 12345 please explain to me in detail to thanks | |
I am studying the C++ code from an opensource project (libredwg) I have the following code: `*offset = *(*src)++;` What does this do? I understand offset = *src++; which would assign src[0] to the variable 'offset' and then increment src so that it points to what was previously src[1]. | |
Hi all. This regards "Accelerated C++" Exercise 7-2. I'm trying to write a program that uses a map to put students grades into grade bands and print which band each student falls into. The grade bands are (A: 90-100, B: 80-89.99, C: 70-79.99, D: 60-69.99, F: <60). I'm getting into … | |
[B]Hello all..[/B] is it possible to create my own simple programming language in c++? complete with the compiler,editor and the libraries.. just a basic model where i can write simple instructions,save it with my own extension and run atleast a few simple algorithms.. | |
Hi, I am starting another applicaton with this code below. When starting that application it is called "javaw" in the ProcessesTab in TaskManager. I simply wonder if it is possible to give this a choosen name in taskmanager under ProcessesTab when starting an application like this with the below code. … | |
Getting error : not sure why error C2660: 'convert_to_Fahrenheit' : function does not take 1 arguments #include <iostream> #include <iomanip> using namespace std; int convert_to_Fahrenheit(); int main() { int celcius = 0; int fahrenheit = 0; cout << "Enter a temperature in Celcius and I will convert to Fahrenheit: " … | |
I have no idea how it will be created plz help me as long experience I have forgotten due to my illness. Write a program to determine if the digits in a three digit number are all odd, all even, or mixed odd and even. Your program should prompt the … | |
how i m going to assign a value of 2!/6 into a variable ??? | |
Hi im writing a program to simulate a slot machine, where a user enteres a coin and has a 70% chance of winning (say 3 coins). Anyways, I have a class slotMachine with a public int random() function. Here is the function: int slotMachine::random() { srand( time(NULL)); randomNum = rand() … | |
hi can any one help me which is the best C++ compiler one can download it freely for C++ programming i will appreciate if some one post any web links for this cheers reddy | |
I am developing a very simple notepad-type program in C++. The only problem is that when I prompt the user to delete their newly written text file, it doesn't work. Since I let the user pick the name for his/her file, I can't figure out the code to delete it. … | |
Okay, I keep getting an error stating that I have few arguments in my void function. I changed it so many time with different combination and yet I still get this error. I just simply want the program to print each digit in a vertical line. #include <iostream> #include <cmath> … | |
hie guys l have basic knowledge of c and c++.Recently we were given a project assignment on statistical modelling we have to implement it using c/c++.I researched on the libarries that l can use eg sdl,openGL,what l wld like to noe is it possible to code using gcc in linux, … | |
help me out, it says rand cant be used as a fuction when compiling. #include <cstdlib> #include <iostream> #include <math.h> #include <ctime> using namespace std; int main(int argc, char *argv[]) { int i,rnumber,number,power,base,rand; int randomise();//initialises random number generator srand(time(0)); cout<<"ten random numbers from 0 to 99\n\n"; for(i=0;i<10;i++){ rnumber= rand()%100; cout<<rnumber<<endl; … | |
The program runs and gives the correct data until it gets to the 4th line of the input. At the 4th line, the calculation is incorrect and when it gets to line 6 of the input, it just stops completely. I can't quite figure it out. Any help is greatly … | |
I can't seem to figure this out. The multidimensional array "structure" changes its values without any reason. I am using Visual Studio 2010 for debugging, and when it enters "structure[x][y] = readData" for the first time, it changes the array's value, but it changes back on next line. I don't … | |
I have a program that is supposed to match opening and closing braces. It's supposed to work like a stack. It works until the last line of the input file. The last line is matching, but because it thinks the array size is zero it drops out and states that … |
The End.