49,761 Topics
| |
I found this neat little GUI calculator program on the net. It uses a function called _gcvt(double val,int limit,string cBuf), which seems to be used to convert a double val to a string cBuf, with some formatting and limiting. I replaced it with sprintf(), but the output looks rather crude … | |
ok im trying to make the towers of hanoi program but i get the following compile error: [Linker error] undefined referrence to 'WinMain@16' Heres the code, thanks for any help [code] #include <iostream> #include <cstdlib> using namespace std; void towers (int numDisks, char source, char dest, char auxiliary) { static … | |
[code] #include <iostream.h> #include <string.h> #include <stdlib.h> #include <iomanip.h> class hope { char st_title[25]; char st_website[35]; char st_star[25]; char st_maker[25]; char st_rating[5]; int i_minutes; int i_year; float f_cost; int i_age; char st_status[6]; char st_response[20]; char ch_option; void getdata(); void processdata(); void putdata(); public: void run(); }dvd; void main() { char … | |
[B]I need some help finding a windows tutorial for C, not C++.[/B] (I am trying to learn C, compile about fifty pages of reference notes on it, and THEN learn C++. That way I dont have to worry about mixing things up, I will have notes and can forget about … | |
need help my program has a table and when progrm run , if for any reasen the power went off i missed last records that i post to table any body can tell me what can i do? :!: | |
First of all, I am new to this forum. If I post this thread incorrectly, please let me know so that I will know better next time. :cheesy: I am having difficulty understanding what user-defined simple data types, namespaces, and string type have to do with calculating taxes. I am … | |
How would you write a program in c++ that would print all pythagorean triples from 1 to 50? :?: | |
I'm writing a program that reads a text file and puts it into an array of structs. There can only be one transaction per line in this format: custNumber firstName lastName numItemsPurchased amtSpent What I dont understand is how do you put the data in the file into an array … | |
hi guys, Below is my program and it is giving me turf time.I want it to read-in 1-for counting cars,2-for counting money and Esc-key for displaying totals.Pliz give me ideas.(i'm using Microsoft-visual c++) [code] #include <iostream> using namespace std; #include <conio.h> class tollBooth { private: unsigned int cars; double money; … | |
I was just thinking if it is possible to determine ones own ip address with the help of C++???Can someone please clear this query of mine | |
Hi there. Im new to C++ programming, but I know my way around Delphi. I'm doing a project that must be made in Borland C++ Builder. My problem is right aligning items in TListBox and TComboBox. Any help would be appreciated. kv.TSverrir | |
I've been working on this for hours I know the errors are staring me in the face but I just can't see them. Any help would be greatly appreciated. //prb01-1.cpp //This program calculates the total surface area of a pool #include <iostream.h> #include<iomanip.h> //using namespace std: int main() { const … | |
Need a bit of help formatting my output. I'm not even sure that this can be done. The output from the following code looks like this: Here is your output! ******************** rval = 0.954316 tval = 9.03351 p = 0.999997 Two tailed value = 5.716140e-006 Ok is there anyway I … | |
Where can i find more info about the inner implementation of new/delete?? There is a lot of info about the different kinds of malloc but i can't find anything about new/delete. IS this compiler specific or defined by the standard?? thx in advance | |
[code] // PROGRAM TO FIND THE NEXT DATE OF A GIVEN DATE #include<iostream.h> #include<conio.h> class udate { int day, month, year; public: void read() { cin>>day>>month>>year; } void write() { cout<<day<<"/"<<month<<"/"<<year; } friend int valid(udate); void operator++(); }; int valid(update D) { int d = D.day; int m = D.month; … | |
I know I am missing a big part of this program but for some reason my mind is not working at all tonight. I need to: > Write a program that asks the user to enter the duration of a baseball game > by first asking for the number of … | |
Hi guys, Quick question, I was trying out to determine the second smallest number of 10 random entered numbers, this is what I got: [code] #include <stdafx.h> #include <iostream> #include <iomanip> using namespace std; int main(void) { int s=0,x=0,y=0; cout<< "Input ten random numbers with cin and determine the second … | |
hi all,i have to write a basic c++ program that has to contain all of the following aspects but i am unable to use bank accounts (or any type of account).[COLOR=blue]i am just looking for any general ideas[/COLOR]. the actual functionality of the program can be relatively simple. thanks very … | |
I am trying to write a program that computes the area of a right triangle. It has to use a function to compute the area. This is actually a part of a bigger program, but when I couldn't get it to work I isolated this section. I tried looking on … | |
I am attempting to write a function that determine the area of a triangle. I am not sure what I am doing wrong when trying to determine the area. The error message I am getting is "error-call of overloaded 'sqrt(int)is ambiguous. Can you help me determine what is wrong?? [code] … | |
How can i find out a parameter's type? e.g. char no1='a'; which function can i use to find out no1 is char type? fun(no1) reture the no1's type | |
i need code for sorting number using Declaring and manipulating Arrays. Passing arrays to the functions as parameters. The objective of this assignment is to provide an on hand experience of: o Declaring and manipulating Arrays. o Passing arrays to the functions as parameters. Problem Statement: For this assignment, you … | |
i have sorted data in an array and sent to a file...how do i put this sorted data in a stack. | |
is it necessary to #include <stdio.h> if im [B]using namespace[/B] std; ? | |
I need to get this code to displayEmployeeInfo if the user enters a negative number for ID. Also I can't seem to get a total of all wages to display. Any helpful hints would be greatly appreciated. Thank you! [code] #include <iostream> #include <iomanip> using namespace std; #include <string> int … | |
i wrote this program to find prime numbers, but whenever i run it, i get an error. This is the code [c++]: int main(void) { int num=0; int i=0; cout<<"num"; cin>>num; while(i<num) { num=num%i; i++; } if(num==0) cout<<"not prime"; else cout<<"prime"; return 0; } My real task is to get … | |
hi... im a bit new to this forum. i saw it on google and decided to join up... im working on a calender like program for my computer science 102 course. the parameters are as follows: Make a program that, when given the mm/dd/yyyy, can decide what DAY the user … | |
I keep on getting one error when I compile this. I can't figure out what is wrong with it. Please help. [code] //Write a program that asks the user to enter two integers. //The program should divide the first integer by the second and then display the resulting quotient and … | |
I have a list of 10 numbers in a array and want to sort them. Basically I am using a "quick sort" and want to swap 2 positions in a array. But Im stuck with the code for how to do this. My code is written below. If anyone has … | |
How can i write an array to file using C++?? i need to write the whole array at once, meaing that the writing function should take a pointer to the array. And the array is holding floating numbers.. What's that fuction name that will satisfy that? How can i do … |
The End.