49,761 Topics

Member Avatar for
Member Avatar for vegaseat

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 …

Member Avatar for vegaseat
0
298
Member Avatar for WrEcK

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 …

Member Avatar for Narue
0
96
Member Avatar for hopeolicious

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

Member Avatar for Narue
0
166
Member Avatar for mister-fett

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

Member Avatar for mister-fett
0
136
Member Avatar for Behzad Oskooi

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? :!:

Member Avatar for Behzad Oskooi
0
184
Member Avatar for brainFreeze

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 …

0
63
Member Avatar for Jason06

How would you write a program in c++ that would print all pythagorean triples from 1 to 50? :?:

Member Avatar for alc6379
0
63
Member Avatar for Nneedofhelp

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 …

Member Avatar for Nneedofhelp
0
123
Member Avatar for ze_viru$

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

Member Avatar for Narue
0
136
Member Avatar for jigvesh

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

Member Avatar for alc6379
0
116
Member Avatar for tsverrir

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

Member Avatar for vegaseat
0
229
Member Avatar for lost_c++_dude

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 …

Member Avatar for frrossk
0
417
Member Avatar for coolmel55

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 …

0
146
Member Avatar for onsbomma

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

Member Avatar for onsbomma
0
369
Member Avatar for sweety

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

Member Avatar for Stack Overflow
0
191
Member Avatar for lost_c++_dude

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 …

Member Avatar for jasweb2002
0
138
Member Avatar for JoBe

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 …

Member Avatar for JoBe
0
127
Member Avatar for stevosmyth22

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 …

Member Avatar for alc6379
0
96
Member Avatar for HConn

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 …

Member Avatar for HConn
0
187
Member Avatar for tonja1196

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

Member Avatar for tonja1196
0
100
Member Avatar for see_moonlight

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

Member Avatar for Narue
0
85
Member Avatar for NAjAM AHMeD

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 …

Member Avatar for jigvesh
0
143
Member Avatar for souphmars

i have sorted data in an array and sent to a file...how do i put this sorted data in a stack.

Member Avatar for souphmars
0
105
Member Avatar for phr0stbyt3
Member Avatar for frrossk
0
101
Member Avatar for hill0ster

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 …

0
80
Member Avatar for quasimof

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 …

Member Avatar for jasweb2002
0
101
Member Avatar for phr0stbyt3

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 …

Member Avatar for Narue
0
118
Member Avatar for lost_c++_dude

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 …

Member Avatar for vegaseat
0
117
Member Avatar for StanVanDamn

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 …

Member Avatar for Narue
0
139
Member Avatar for Flawless

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 …

Member Avatar for DKnight764
0
5K

The End.