49,761 Topics
| |
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) … | |
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: | |
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++), … | |
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? | |
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 … | |
#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++) … | |
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? | |
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 … | |
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 | |
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. | |
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 … | |
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 … | |
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 | |
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 … | |
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 | |
#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 … | |
Hai all, Does anybody know how to read a binary image file and convert it to a GeoTiff image? pls help :cry: | |
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 … | |
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 … | |
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 … | |
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++? | |
| 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 … |
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 … | |
anyone know where i can get the answers for the exercises...Im stuck on some of these... | |
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> … | |
[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 … | |
[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 == … | |
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 … | |
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. | |
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 … |
The End.