49,761 Topics

Member Avatar for
Member Avatar for shonenhype

Write a function IsoTriangle() that takes a size parameter and dispays an isoceles triangle with that many lines. Use the DrawBar() function as a basis. (Hint: Use another function Spaces() to display the leading spaces before the start of the asteriks on each line.) For example, the function call IsoTriangle(4) …

Member Avatar for Narue
0
151
Member Avatar for ANRCCC

I am trying and I don't know what to do. Attached is a aprogram and I don't know what is going wrong. :sad:

Member Avatar for Narue
0
111
Member Avatar for xplst

I've just downloaded the C++ sockets library from [url]www.alhem.net/Sockets[/url], but I can't get my programs to link -- I get a lot of "undefined reference"s.... I'm using g++ version 3.3.3. on Fedora Core 2 (kernel version 2.6.5-1.358). I can get the programs to compile (using the -c flag to g++), …

Member Avatar for grymse
0
3K
Member Avatar for ANRCCC

I fixed my program from the previous complaint and I got it to run. Now my problem is that it won't run correctly. Can you help me?

Member Avatar for frrossk
0
126
Member Avatar for dal4488

This is what I have so far and I can't figure out how to get the converted length in my output file so that 312 inches converts to 3 yards, 1 foot, and 3 inches. #include <iostream.h> #include <fstream.h> using namespace std; int main() { ofstream outfile; int centimeters; int …

Member Avatar for blackdove
0
102
Member Avatar for missy

#include <iostream> #include <string> #include <fstream> using namespace std; void main() { ifstream indata; ofstream outdata; char name [13][20]; float avg[20]; int sum=0, n, i=0, m,p; float davg; char ch; indata.open("a:nameFile.txt"); if(indata.fail()) { cout<<"file not open:"; exit (1); } while(i<=20) { for (i=0;i<20;i++) indata.getline(name[i],20); } for (int k=1; k<=3; k++) …

Member Avatar for Narue
0
113
Member Avatar for roscioeak@direc

Can anyone direct me where to go for doing stacks in C++. I have to make a program using stacks but can you initialize a stack with given values? If so can you give an example?

Member Avatar for vegaseat
0
101
Member Avatar for xsxixtxhx

I have a project that i am working on and i can't get how to get it to work. I have attached the .h and the main cpp file. If any one can be of help please reply or im me at xsxixtxhx on Instant messenger. I need to get …

Member Avatar for kc0arf
0
235
Member Avatar for MAD_DOG

Is there any books you guys know of that someone like me that dont know anything about programming can use C++/VB what ever something that is quick and easy to understand. Something really simple something you guys can recommand. Thanks again

Member Avatar for bombe
0
411
Member Avatar for odee

is it possible to create an array then you pass it to a function? That function will change the values in the array then return it back as an array.

Member Avatar for Dave Sinkula
0
119
Member Avatar for Dani

I am taking a Computer Graphics course where we are doing some c++ programming using the OpenGL API. I'm writing a C++ program in Visual Studio.NET, where I've installed GLUT (Open GL Utility Toolkit). OpenGL, itself, apparently comes with VS. The only include that I have in my one-file program …

Member Avatar for Intel
0
1K
Member Avatar for notdumb

I was attempting to initilize bool done to false, then have this program continue to give the user the option to do more check balance functions util they pressed exit, however, my program continues to cycle repeatedly, even after option 5 (EXIT) is entered. Please, some help on how to …

Member Avatar for notdumb
0
170
Member Avatar for mattcplusplus

I'm wanting to send an email from my c++ application. i know that email applications interface with an SMTP server when sending email and that is what i will have to do, but i don't know how. Thanks for your help

0
85
Member Avatar for Asif_NSU

After having us write codes to convert decimal numbers to another base my faculty has now asked me to write codes to convert a number from ANY base to another. He explains that itz simple since i already wrote the program to convert integer to another base. So i just …

Member Avatar for Asif_NSU
0
204
Member Avatar for sidhjn

hello! I am a newbie and probably dont know much. I need to implement a 1-bit adder in c/c++ and then combine this 1-bit adder to make 32-bit adder. I shall be really grateful if you can help. Regards, Siddharth

Member Avatar for Narue
0
145
Member Avatar for ah01

#include <iostream> #include <stdio.h> #include <iomanip> using namespace std; struct person { char name[15]; int Idnum; int *testscores; float average; char grade; } *student, freshman; //////////// function prototype /////////// void allocate_memory(int number_students , int number_scores); void get_data(int number_students ,int number_scores); float validate_score(int score); void print_results(int number_students ,int number_scores); void release_memory(int …

Member Avatar for vegaseat
0
165
Member Avatar for gal05

Hai all, Does anybody know how to read a binary image file and convert it to a GeoTiff image? pls help :cry:

Member Avatar for Narue
0
62
Member Avatar for Leigh

Hi I'm trying to find a way of calling statistical functions in Visual C++ .NET. To give an example of what I'm trying to do, there is a built-in function in Excel called GAMMADIST, which evaluates a cumulative gamma distribution function. Another example is the NORMINV function in Excel, which …

0
111
Member Avatar for seeplusplus

alright, so i have two files now, main.cpp, and Rationall.h, when i compiled my code it gave me this.... /tmp/ccyeOf6F.o(.text+0x1a6): In function `main': : undefined reference to `rational::~rational [in-charge]()' /tmp/ccyeOf6F.o(.text+0x1c4): In function `main': : undefined reference to `rational::~rational [in-charge]()' collect2: ld returned 1 exit status this is my code......i dont …

Member Avatar for Tripoli178
0
100
Member Avatar for tones1986

the code compiles but when i try running the .exe it closes. It looks liek for the 2 seconds its up it works, but then it closes itself. What am i doing wrong? heres the code: #include <iostream> using namespace std; int main() { // sets variables to be set …

Member Avatar for bombe
0
600
Member Avatar for chound

I get 2 strings. I remove all the characters present in both the 2 strings.I count the no. of characters left. How do i do this in C++?

Member Avatar for vegaseat
0
174
Member Avatar for Geek-Master

I've been playing around with files and streams and just hit a pot hole. My goal is to be able to input time and date into a file when say someone "clocks in/out". Just a little program that will help me keep up with my time in school. [CODE] #include …

Member Avatar for Geek-Master
0
121
Member Avatar for 40ounce68

Well currently Im a student, and very interested in becoming a good C++ programmer. Im currently in a class and is very challenging for me. I mean, I read the book, but have a hard time applying it sometimes...any of you experts have any tips for me. Cause I really …

Member Avatar for Narue
0
90
Member Avatar for 40ounce68

anyone know where i can get the answers for the exercises...Im stuck on some of these...

Member Avatar for vegaseat
0
104
Member Avatar for evilsilver

I am trying to make a program that needs to compare a string. here is a basic program of what i mean, i want it to say "it worked" but it seems to only read as not true. anyone know how to do this? thanx for any help. [CODE]#include <iostream> …

Member Avatar for jimFan
0
134
Member Avatar for SquirrelProdigy

[CODE]SetConsoleMode(InputH,ENABLE_PROCESSED_INPUT|ENABLE_MOUSE_INPUT); while(1) { ReadConsoleInput(InputH,&InputRecord,1,&InputEvents); if(InputRecord.Key_Event) { if(InputRecord.Key_Code == VK_RIGHT) cout<<"You pressed right. Yay!"<<endl; } FlushConsoleInputBuffer(InputH); }[/CODE] [FONT=Book Antiqua] [SIZE=4][COLOR=DarkSlateGray]FlushConsoleInputBuffer() is used to prevent input from echoing, correct? If so, that command isn't doing it's job, I still get echo, and I can't figure out why. Any suggestions? I reposted this …

Member Avatar for SquirrelProdigy
0
366
Member Avatar for Sam Lehman

[code]#include "stdafx.h" #using <mscorlib.dll> using namespace System; #include <iostream> using namespace std; int _tmain(){ char payType; double payRate, salPay, sesTaxes, sesGross, totalTaxes=0, totalGross=0, aveGross, hours; int pwPieces, empCount=1, anotherRound, hourExempt; cout<<"Sam Lehman\nPayroll Output File\n"<<endl; while (true){ cout<<"Pay Type? (type S, P, or H)... "; cin>>payType; while (true){ if (payType == …

Member Avatar for Sam Lehman
0
154
Member Avatar for tones1986

I have this banking program that has a savings, checking account set up. The user has 4 options. Checking, Saving, Balance, and monthly maintenance. The checking option is all correct and never comes out weird...u can deposit everything and withdraw without any probs. If i do that -- then i …

Member Avatar for tones1986
0
145
Member Avatar for Alfarata

I am writing a program in C not C++ how do I allow the user to input a name for the file, but not the extension. I will use the extension .csv always.

Member Avatar for Narue
0
229
Member Avatar for dal4488

Hi, I'm totally new to C++ and so far am extremely confused. I was wondering if anyone could give me any help with one of my assignments. Basically I don't know where to even start. I think if maybe someone can help me get started maybe I can figure this …

Member Avatar for vegaseat
0
602

The End.