49,761 Topics

Member Avatar for
Member Avatar for WonderWomen204

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 …

Member Avatar for WonderWomen204
0
170
Member Avatar for fluidDelusions

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 …

Member Avatar for ims
0
1K
Member Avatar for christiangirl

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 …

Member Avatar for christiangirl
0
115
Member Avatar for Race

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, …

Member Avatar for Race
0
74
Member Avatar for Megaz221

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. …

Member Avatar for VernonDozier
0
278
Member Avatar for iiz

this is the python code [CODE]os.popen("explorer.exe " + os.getcwd())[/CODE] would jsut need a conversion to c or c++

Member Avatar for iiz
0
95
Member Avatar for GPXtC02

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 …

Member Avatar for vmanes
0
478
Member Avatar for leverin4

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 …

Member Avatar for Lerner
0
129
Member Avatar for an00b

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.

Member Avatar for dougy83
0
48
Member Avatar for pship07

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 …

Member Avatar for VernonDozier
0
102
Member Avatar for demroth

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 …

Member Avatar for demroth
0
151
Member Avatar for daviddoria

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

Member Avatar for daviddoria
0
280
Member Avatar for GPXtC02

is there a built in function to deal with numbers similar to how the swap member function (first.swap(second);) deals with strings? thanks

Member Avatar for GPXtC02
0
258
Member Avatar for Ryano24

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]; …

Member Avatar for Majestics
0
98
Member Avatar for yarita

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 …

Member Avatar for Majestics
0
115
Member Avatar for tootypegs

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 …

Member Avatar for tootypegs
0
114
Member Avatar for TylerTCF

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.

Member Avatar for bugmenot
0
77
Member Avatar for legendarya49

[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 …

Member Avatar for legendarya49
0
141
Member Avatar for idle09

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

Member Avatar for vmanes
0
33
Member Avatar for munawwar firoz

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 …

0
48
Member Avatar for jmines

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> …

Member Avatar for jmines
0
97
Member Avatar for vaid.abhishek

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 …

Member Avatar for vaid.abhishek
0
136
Member Avatar for wubeikk

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 …

Member Avatar for wubeikk
0
183
Member Avatar for rem0404

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 …

Member Avatar for rem0404
0
159
Member Avatar for ulrik04

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 …

Member Avatar for ulrik04
0
75
Member Avatar for ecorg

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 …

Member Avatar for Salem
0
79
Member Avatar for varsha0702

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 …

Member Avatar for Salem
0
174
Member Avatar for rukshenaa

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.........

Member Avatar for Salem
0
182
Member Avatar for Troula

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 …

Member Avatar for Narue
0
108
Member Avatar for ronicasingh

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

Member Avatar for Narue
0
67

The End.