49,761 Topics
| |
// In this program: when i compile this program, the complier shows error in the main section(I have mention this error in main section) that is "can not convert sample to sample in assignment". this error is occuring only when i try to access private members of class through pointer … | |
#include <iostream> #include <fstream> #include <windows.h> #include <ctime> #include <string> #include <iomanip> using namespace std; enum ConsoleColor {Black, Blue, Green, Cyan, Red, Magenta, Brown, LightGray, DarkGray, LightBlue, LightGreen, LightCyan, LightRed, LightMagenta, Yellow, White }; void line(void); const int Start=1900; void write_Data(); void Read_Data(); void SetColor(int text, int background=Black) { HANDLE … | |
This is a C++ program that reads as input a text file. The file is read character by character and count the number of unique characters. | |
Hi everyone, I am writing a program that converts numbers to words and vice-versa, like typing on a older cellphone. The user enters as many messages as he wants in numbers and/or text. The first character of the messages indicates what the remaining string is: numbers or letters. I can't … | |
Huffman Code In this assigment, you need some text files. Click HERE to download some. In this assignment, you are to implement the Fixed-length Huffman coding that we learn in the class. You should perform the following: 1- Huffman Encoder. a. This is a C++ program that reads as input … | |
Hi guys, I'm trying to write a function that could convert a lowercase string to uppercase. Not sure if I'm heading the right direction. Essentially the function [CODE]ToUpperString (char s[]);[/CODE] would convert everything in the string to the uppercase equivalent. Here's what I got so far: [CODE]void ToUpperString ( char … | |
I am a beginner but my problem with this game is that when i enter east it said it going to north. here my code for my main and parser also when i enter a word then it quit the game so how do i make it stay open to … | |
So i believe i got my prefix working, now i'm trying to get my postfix working so that the class object happy should have its day increased by 1. Not sure whats wrong. Maybe the way it receives the month and day in the constructor? main #include <iostream> #include <string> … | |
Hi. I'm having some touble printing year. Here is the code where I expected an output of "Year: 2013" time_t tm; time(&tm); struct tm ts; errno_t err = localtime_s(&ts,&tm); cout << "Year:\t" << ts.tm_year << endl; But what I get is "Year: 113" Appreciate any help offered. | |
I kept getting an segmentation fault, so I think I need to decrease memory usage but I am unsure of how. I am using the Sieve of Atkins to calculate prime numbers and then testing the primes against 600851475143 (Project Euler). Here is my code so far: #include <iostream> #include … | |
i have tried so much to understnd this problem but can't able to get it.. plxx tell me how it will b solve or atleast give me syntax.!! this is the header file that i had made.. // A 2-dimensional point class! // Coordinates are double-precision floating point. class Point … | |
Hey guys and gals. I'm looking for a little help here. I am throughly lost as to how to do this program. Keep in mind I am not asking for someone to do it.... although the though is crossing my mind lol. I'm just looking for pushes in the right … | |
I am looking to finish up this program for class. I'm lost when it comes to arrays and I've read all the course work, the book, etc. The question is how do you increase an array element at the position? using namespace std; int main() { int quantity[4][5], warehouse, product; … | |
| I've checked through the newest C++ Primer a bit, but it doesn't feel like it fits me that much seeing as I would like it to have more focus on exercises (or something that progresses from a small program to a bigger and more advanced program, you catch my drift) … |
How can I write a C++ program that defines three 1D arrays with 19 elements in each array. The arrays will be used to store temperatures in degrees F, degrees C, and Kelvin and Use a loop to initialize the array with degrees F values to 32, 42, 52, …, … | |
Hi i've been working on a piece of homework we're I've been asked to implement a 2d grid in opengl and extend Dijkstra's algorithm to A star, so far i've been able to get the 2d grid running with Dijkstra's algorithm with not too many problems but my current extenstion … | |
What is Abstract Class? And what are the difference between Abstract Class and Abstract Method? | |
Where can I find iostream.h ON THE INTERNET basically, I know how to use iostream.h, but I need to download it. I am not going to download a new compiler. I do not need any tips on how to include it in my program. Just where to find it. I … | |
| program does not work: Assignment: In the sport of diving, seven judges award a score between 0 and 10, where each score may be a floating-point value. The highest and lowest scores are thrown out and the remaining scores are added together. The sum is then multiplied by the degree … |
| Write a for-loop statement that displays numbers from 1 to 10 in each line. Use Counter as a counter variable |
I tried to save my record to wave file with using portaudio library.The samples are saved in recordedSamples array and I tried to add headers of wave file.I am doing something wrong.So,could you please rectify this ?? Thankss...Here is my code : int main(void) { PaStreamParameters inputParameters, outputParameters; PaStream* stream; … | |
i am trying to a c++ program that will determine if two circles intersect each other. the input will be <x,y> coordinates for the center of each circle followed by the radius of each circle. the output will state whether the circles overlap, don't overlap or tangential(touch each other at … | |
Hi. First I apologize if in wrong section of forum for this question, but I will eventually be working in C++. I don't know where to start on this project, so my terms will most likely be wrong. The idea is to partially hash an executable file, that part of … | |
| i need help with a c++ code for a prefix calculator using stack... doin basic math functions i.e.(+ , - , *, and /) .. my email add is carl_obwogo@yahoo.co.uk |
[Click Here](http://answers.yahoo.com/question/index;_ylt=AlQJPiETIJOaaftERf6r1l7sy6IX;_ylv=3?qid=20130507233149AAQXvZ6) answer this please... | |
I was in the library's multimedia room to do my assignment, but all PCs don't have Visual Studio and other smiliar programs. So I wrtie the code on Notepad for the question: > Design a solution that will determine and display the fewest number of ringgit and coins in change … | |
Hello, I am making a number of libraries to help me with my projects and I am torn between two approaches. I will show you what each looks like. I have no idea which would be considered 'better' in general. Locals: #ifndef SOME_GUARD #define SOME_GUARD VERSION_NUMBER #ifdef __cplusplus extern "C" … | |
Hello, I have been trying to figure out how to make an array work with a calculator that uses up to 100 different inputs to calculate sum, difference, standard deviation min max etc. When I try to compile the code I get (error: no match for 'operator<<' on line 64 … | |
I need to make program that calculate multiplication of matrice i made it in main now i need to make it in functions would anybody hepl me with my problem that is my code #include <iostream> using namespace std; #include <cstdlib> void fn(int **arr) { } void fn2 (int **arr2){ … | |
i would like to have the ability to tell the player they cannot go that way if the exit does not exist the rooms are in a text file that is read in, i know i should use a if function but dont know where to put it, any help … |
The End.