49,761 Topics
| |
Here's the problem: Write a program that produces a bar chart show the population growth of Prairieville, a small town in the Midwest, at 20-year intervals during the past 100 years. the program should read in the population figures (rounded to the nearest 1000 people) for 1900, 1920, 1940, 1960, … | |
Hi, I am required to convert an Array Type DOUBLE to INT, for ease of plotting a graph. Fairly new to programming and unsure how to go about this. Any ideas appreciated | |
I've made a simple function that takes a vector as an argument. If the vector is empty, it throws a domain_error (I've included stdexcept). I'm feeding it an empty vector from the main loop just to learn try...catch statements and when it catches the error, it's supposed to print something … | |
I have a string that has a ton of random characters (pulled from a webpage). I want to pull all of the numbers, commas, hyphens, periods, and percentages from the page and put them into a text file. I'm new to C++ so I'm not sure how I'd go about … | |
looked everywhere, but all the information i find doesn't explain clearly on how to do this. im not sure how to store char* tokens[...] into an array where i can manipulate them. when i try storing tokens into array by: shapes[n] = tokens[n]; and when i try to print out … | |
How do I do 2D opengl? I need to be able to put stuff up on the screen so that it is not rendered in three dimensions, and I need the 3d stuff to still be 3d behind it. | |
How do I check whether the data members of two objects belonging to the same class are equal? Will the following code do or is it done in some other manner?? [CODE=C++] class Sample { int a; public: S(int x) { a = x; } int getA() { return a; … | |
I am just trying to load a data file into an array and display it. I run it and nothing comes up on the screen. Are my arrays set the right way and set to be output the right way. Please let me know what I am missing. int main() … | |
While Getting the message WM_DEVICECHANGE ( either device arrival/romal (DBT_DEVICEARRIVAL/DBT_DEVICEREMOVEPENDING....), how we may able to get the device name like KingstonDataTraveler_2.01 PDEV_BROADCAST_HANDLE pDBHandle =(PDEV_BROADCAST_HANDLE) lParam; if(pDBHandle->dbch_handle !=INVALID_HANDLE_VALUE) { STORAGE_PROPERTY_QUERY query; DWORD cbBytesReturned = 0; char buffer [10000]; memset ((void *) & query, 0, sizeof (query)); query.PropertyId = StorageDeviceProperty; query.QueryType = … | |
I have a sample program that shows how to load data into an array but I need to change it to sort movie titles into columns for movie title, length,year, media type from a file named movies.dat It asks first from where to load...then loads in no particular order...then sorts … | |
Hi, I know of two curl and libtorrent but I was just doing a study on what library/component/whatever you call it, is famous among download managers. I could not get information on FreeDownloadManager, Flashget, Multiget, DownloadThemAll et al. Would you help me find what libraries do these use, especially for … | |
I require a survey c++ program. The requirements are that it must do the following: It must first the user what they would like to do: 1.Complete the survey and writing it to a file, averaging some results and then quiting 2.Read the survey results from the files (password protected) … | |
I have to write an application in which a text file is read and stored in a vector of strings [CODE]vector<string> text;[/CODE] After that I have to compare each character of text loaded from a file with an array of char with default content [CODE]char ARRAY[21] = {... ... ...}[/CODE] … | |
Which is the best book to study more about windows programing(using windows.h heder file in cpp).Please give the details of good text to study the MSDN API s. thank you. | |
You can access the sound chip to play midi voices using winmm.lib, or in case of Dev C++ the libwinmm.a library. There are 128 midi voices to pick from, anything from the Acoustic Grand Piano = 0 to the Gunshot = 127. | |
Hi all, I am receiving the keyboard read/Terminate command from the client(PC) to the Board(Windows CE) through Serial Interface. I need to terminate the character reading from Keyboard if i receive Terminate Command. Termination/Continuation is been handled inside a thread. But whenever Terminate Command comes Character reads are continuing till … | |
Sorry about all the posts; found time and have found time to do programing. Ok I want a usual console application to make a Win GUI window saying thanks at the end of the console app how would I do this eg: [CODE]#include whatever Using namespase std; // what does … | |
How would I togle casp lock in a c++ program without the key; I want my keybord to look haunted(the casp lock button has a light on it : ) | |
We just started discussing stacks and queues in my class, and our teacher left us with some questions to answer. I got all of it done except for the last question, which I honestly just can't understand, and am wondering if there is something about stacks that I'm missing. Here … | |
I'm trying to develop a pixel shader that allows me to input colors to directx in a 0-255 range for each chanel, and it will convert it to the 0-1 range that pixel shaders need to return, but the input to my pixel shader is sometimes being clamped to 255 … | |
I've messed with this program for awhile, i can't figure out how to make any of the other triangular shapes beyond the first one i have. Also there's a diamond that i am supposed to make, and a triangle with spaces in the problem. Can anyone help me re-construct my … | |
Quick question (though I still want to get my long OpenGL question fixed) is there a faster way to Xor the bits of an integer than this: [CODE](MyInt&0x1)^((MyInt&0x2)>>1)^((MyInt&0x4)>>2)//etcetera[/CODE] Just to clarify by faster I mean faster to execute, not to type as this operation will have to be done many … | |
need some help with the friend function that overloads the << operator heres my code thus far.... [CODE]#ifndef PRODUCT #define PRODUCT #include <iostream> using namespace std; class CProduct { private: int productID; // 5-digit product ID number int manufactureID; // 4-digit manufacturer's ID double price; // wholesale price double markup; … | |
heyy all..I am really confused on the MOD (%) operator and how it is processed.. [CODE]int n; cout << "Enter n: "; cin >> n; for (int i=1; i<=n; i=i+1) if ( (i % 2) == 0) //even cout << "-"; else //odd cout << "^"; [/CODE] What exactly is … | |
Here is my question that I can't manage to google and solve. I wrote a simple C++ program that adds two numbers. However, how do I call an assembly code to do this addition. It will be easier to show what I have so here it is. Here is my … | |
I herd that some C++ compilers can use asembly languige in there programs along side C++, How would I do This? And is there any way to use a compiler as an assembler? <<two questions. | |
Ok google was/is no help in this sittuation; are there any alternarives to these the thing they do and current function is listed please say if rhere is an alterative as most of these seem to dislike me or are in a libray and code::blocks has a problem with librarys … | |
Ok I have an assignment for school where we are building a compiler step by step each week. This week I have to make a syntax analyzer that picks out the errors from this text file below. In the source code I have provided below I have a lexical analyzer … | |
Hello guys i need your help to finish my project in computer programming so guys i need your help problem: the new telephone company has the following rate structure for long-distance calls: a. The regular rate for a call is $0.40 per minute b. any call started after 6:00 PM(1800 … | |
the program must read a text file, encrypt the content and then rewrite everything to a text file. compile ok, it crashes while running and still produces an empty output. how can I fix this? vigenere.h [CODE] #include <string> using namespace std; class Vigenere{ private: string key; string text; static … |
The End.