49,761 Topics
| |
hey there. This is Erinn Hansen and I have a quick question about this assignment I am working on. I pretty much have it, except for it's a little backwards. This assignment is: Write a program which accepts the following user input: priceOfHouse, numMonths Print an amortization chart as shown … | |
Hello! I'm having a very difficult time with this problem. What I'm trying to do is generate a sine wave for a specific frequency and output it as raw pcm data to a file. The sine wave is generated as follows: [code] samples[i]=static_cast<int>(32767 * amplitude * sin(static_cast<double>(i)*scale) ); [/code] where … | |
I'm getting this error: term does not evaluate to a function taking 1 arguments on the bolded and underlined parts of this code. I know this code isnt that great...has some extra stuff it doesnt need, but I'm working on that. This is pretty much the first program I've made … | |
I new to programming and am having troubles writing C++ programs and would really appreciate help with the following question. Write a C++ program that reads from keyboard 3 words, with proper input prompt. Then for these 3 words that were read, the program displays first the word longest length, … | |
Hi, I'm back again. Anyways, I have been working on a little project on my own. But I have a question about something. How would jumble characters in a string around. Let's say user inputs a word computer , the program then jumbles the characters in the string to mpcotreu. … | |
this is the python code [CODE]os.popen("explorer.exe " + os.getcwd())[/CODE] would jsut need a conversion to c or c++ | |
i'm looking to get a first name followed by four scores and finally a last name, stored into multiple arrays (a char *array, a float array, & a char *array). getting the scores i understand however the names are pointer arrays. as far that goes what am i doing wrong … | |
Ok, I have a program that uses three classes and a driver program, all compiled separately. One class is a Date class. The Date class header looks like this: [code=c++]#ifndef DATE_H #define DATE_H #include <iostream> using namespace std; class Date { public: // initializers Date(); Date(int day, int month, int … | |
I'm using windows xp sp2 so I would like to know how to do it with winpcap, an example source will be helpful, thanks. | |
I need to make a program to do the following: 1. ask the user for the name of the input file, and open/read it. 2. For each well-formed cout statement, i must execute it. For any malfunctioned cout statement, print an error message. the syntax of a well-formed cout statement … | |
I am working on sorting strings of integers with a radix sort. I am confusing myself on the code logic however. I have a file with integers, one to a line, and padded so 1 would be 001. I want to read those integers as strings so I can later … | |
I found _isnan() in float.h for VS2008, but I would like to SET a variable to a NaN intentionally, not check if it is one. Is this possible? Thanks, David | |
is there a built in function to deal with numbers similar to how the swap member function (first.swap(second);) deals with strings? thanks | |
I am having some trouble getting this code into C++...Can somebody help me! [code] [inlinecode=cpp] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int random_1(); int main() { int i = 0; int j = 0; int check; int check_1; char play_again = '\n' ; int tortoise[70]; int hare[70]; … | |
can anyone help me fix this??? I have to do all of this in functions, but i keep getting somethings wrong. Thanks! Sample Run (The user’s entry is in bold) Enter the Students Id:[B]5656[/B] Enter how many courses-up to 3: [B]6[/B] Invalid number! Try again Enter how many courses-up to … | |
hi, im having trouble when outputing the data from my program. i am trying to output numerous amounts of data into 1 txt file when running through a loop, but everytime it writes to my file it overwrites the previous data stored with in it. Can anyone offer some advice … | |
Is it legal to have a vector of struct to be returned as the output of a user-defined function? I can't seem to get it to work? Thanks. | |
[code]#include <iostream> #include <time.h> #include <fstream> #define MAXSIZE 1000 #include <cstring> #include <string> using namespace std; class Students { public: string firstName; string lastName; string social; double gpa; Students() { firstName = "Adam"; lastName = "Wilson"; social = "000-00-0000"; gpa = 0.00; } Students(string newSocial, string newFirst, string newLast, double … | |
Hi! When I compile my program, I am getting an error message which says "fatal error C1010: unexpected end of file while looking for precompiled header directive" How can I solve this problem? By the way I am using microsoft visual C++ 6.0 | |
Hi all! Iam new to win32 programming.I use Dev-C++,I know how to create buttons using the CreateWindowEx function.But dont know how to display icons or bitmaps on buttons nor on static windows [B]during run time[/B].All i know is that the BUTTON class supports BS_BITMAP and BS_ICON dwStyle. and i dont … | |
I am new to streams and files in C++. I am having a problem in this code. When i run the program, and after entering the password, a message is displayed "error opening infile". Why the program is not reading from the file or opening it? [CODE]#include<iostream> #include<string> #include<fstream> #include<iomanip> … | |
Okay, guys, after running a thread bout tht nth_element problem [ which is still not solved ] I again have a problem. The code I give below [ I have also attached the file ], is simply a MergeSort procedure. It works wonderfully well. I have enabled validation of it … | |
Assignment #1 First Class – extended version 1. Extend the class myTime from the previous assignment so it includes methods of all types (excluding operators) discussed during the lecture. The constructors and the destructor should print out a notifying message on the screen. 2. Write a function with the copyMe … | |
so i'm trying to fix my "load" function, but i can't seem to get it to work correctly. here's the load function i have currently: [CODE]void load(string messages[], int keys[], int& numElements) { int index = 0; int key; string message; while(index < MAX_SIZE && key > 0) { cout … | |
Hello :) I'm making a very simple game in C++ (very much like the old DOS game Supaplex if anybody know that :P). I'm using the windows API, not GDI, DirectX or anything like that. I've only just begun learning the Win Api some days ago :) I have the … | |
Hello, I am fairly new to c++ and I am wanting to find out some information about creating a calculator that can calculate a noisy input stream e.g. 1hgj6-fgkj7 = 14 (1+6+7) 3ku5jf3 = 11 (3+5+3) I have looked into some tutorials when creating a calculator in C++, although none … | |
Hi.. I have written a C++ program to compress and decompress jp2k files. But when I am executing this program the CPU usage is 100%... Can any one tell me : why is it so and how to reduce CPU usage? I have compiled same code on windows and Linux … | |
implementing dijkstra algorithhm using fibonacci heap.................. can anybody help me with the coding for the above problem................. i have implemented using array.... now i hav to implement it using fibonacci heap......... | |
This is a code i made, for checking if a nickname and password exists.. I have two question about this code... 1) In line 38 i close "fuser", but if i try to use this again there is an error. So, i used "fpass". Is there any way to use … | |
Hello, This may sound like crazy question, but need some certainty. In a normal i/o console, is it possible to draw or have lines along with inputting text. Ronica |
The End.