49,761 Topics
| |
A quick question: I have been writing a small program to simply read a file and send to cout. [CODE]#include <iostream> #include <fstream> using namespace std; int main() { char ch; ifstream in_stream; in_stream.open("self.cpp"); while(!in_stream.eof()) { cout << ch; in_stream.get(ch); } in_stream.close(); return 0; } [/CODE] This works ok, except … | |
Hi, I am writing a geometry engine using homogeneous coordinates (4D representing 3D Euclidean coordinates) used for perspective projection. This is handled by two classes a 4-Vector "fourVector" and a 4x4 Matrix "fourMatrix". For speed I have not (yet) separated class and member function declaration from definition. [CODE]class fourVector{ public: … | |
Please help with my assignment, our teacher told us to write a code in c++. 1.Enter 15 students and their general average. 2.List the top 10 students with a highest general average. thank you very much for helping me. | |
Hi everyone! If anyone interested in learning C++ you can add me on skype. My skype id is alishujahx I am programming in c++ since past two years and have written several big projects in c++. I have done 10 projects on rentacoder with average rating of 10/10! However this … | |
Do any of you have aim or google talk or email that I could ask some C++ questions through? | |
Hello people I have jusrt recently started to study C/C++ and I am using Borland 5.02. I am having a problem examining my outputs. when I run a successfully compiled program the Dos window that I should read my print from flashes on then flashes off:'( and I do not … | |
How do you create a program in c++ to find the closest pair of points in a 2D plane recursively? | |
Ok the code below is supposed to edit a file called license.dat and replace texts in it... it works great it does all that but I want to implement user input in it. By this I mean I want the user to be able to enter the drive letter for … | |
Hello all, As my name indicates, I am a new programmer. I was doing a program which calculates the roots of a quadratic equation but unfortunately there seems to be something wrong as it ignores my if statements! Please take a look at my code and I'd appreciate your help | |
Hi, This is a very basic question, but I can't seem to get working, I've a set of numbers that I need to display in the following, this is a class function btw. The ouput should be something like { 1, 2, 3, 4, 5} (there are {} brackets and … | |
can any one give me a c program for finding the length of the string and also to compare it with other strings with the help of linked list | |
Hi ,im having a problem with my do while loop,basically I want it to loop so long as the users attempt is less than 10. However,it just doesnt want to seem to let me do this.Ive tried putting the "attempts++" several places through the loop as i thought this might … | |
New Question. I end the output to one file (fout1) and try to start it to a new input and output file, using this code: [CODE]" fout1.close(); } cout << endl << "Detailed employee reports have been printed in " << fileOutput1 << "." << endl << endl; cout << … | |
I was wondering if there was a way to control the cursor on Linux and use a C/C++ program to make a certain 'output' appear on the screen in any co-ordinate we want for a specific period of time? | |
Below is the code that I have to find the Mac address of any pc (physical host ID) I struggle to make it print to a file but now i have a problem... It prints MAC Address: XX-XX-XX-XX-XX-XX to C:\\Physical-Address.txt but I only want it to print the XX-XX-XX etc … | |
[CODE] #include <iostream> #include <iomanip> using namespace std; int main() { // Variables for used for user input int nbase; // Users input is needed but no error checking is done as per lab instuctions cout << "Please enter your choice for conversion. The letter O for octal OR B … | |
Good evening, I am writing a program in C++ for a Tic tac toe game. Here are my directions: Create a C++ console application that allows two players to participate in a tic-tac-toe game. The program will be responsible for deciding who wins the game. The program should include the … | |
[code c++] // AY3814 - Chris Ramsdell. Program 1 - Hangman game per guidelines. #include "stdafx.h" #include <time.h> #include <stdlib.h> #include <iomanip> #include <iostream> #include <string> #include <fstream> #include <cmath> #include <stdio.h> #include <cstdlib> #include <sstream> #include <vector> using namespace std; int main(); class Hangman { public: void set_values (string, … | |
I have been struggling with this one for a day now and I cant seem to figure out if my problem is syntax or simple impossibility. The function in question looks something like this: [CODE] string *function( string temp[] ) { string sides[ 4 ]; // code return sides; }[/CODE] … | |
Mobile developers will be pleased to learn that Recursion Software has announced the availability of a C++ Toolkits Symbian bundle. The cross-platform, mobile and embedded app development tools specialist took the opportunity at the CTIA Wireless IT and Entertainment Expo 2009 to announce that C++ libraries for the iPhone and … | |
i am haveing alot of problems in my computer programming 1 clas in school and was wondring if any people on here would be kind enough to help me out with some programs 1 of them is this i need to make a basic program in the compiler that allows … | |
Use a do-while statement, write a program that continuously requests a grade to be entered. If the grade is less that 0 or greater than 100, your program should print an appropriate message informing the user that an invalid grade has been entered, the program should exit the repetition loop … | |
Here is the mortgage calculation in C++ but I don't know why the table dosn't print out when I make run. #include <cstdlib> #include <iostream> #include <cmath> #include <iomanip> #include <string> using namespace std; bool exit_p=false; unsigned short select_opt1(); void cont(); void second_opt1(); void first_opt1(); void print_table(unsigned short mm,unsigned short … | |
Hi I am very new to C++ and I was told to make a program that start with the ammount you choose but it has compound interest of 6% a year (0.5% a month) and you take out 500 dollars a month, at what months and years would the account … | |
hi! im new with inheritance. can anyone tell me what to do/how to solve this error: LNK2001: unresolved external symbol "public: __thiscall Circle::Circle(double,int,int)" (??0Circle@@QAE@NHH@Z) cylinder.obj : (?area@Circle@@QBENXZ) error LNK1120: 7 unresolved externals I've already searched for it but i didn't get it.. thank you! (I removed my codes. thanks for … | |
I'm trying to create a program that takes 2 numbers from a user (a numerator and a denominator), displays one ontop of the other separated by dashes, and then shows the answer of one number divided by the other. Inside an If statement, I want to output several lines using … | |
I got a question about c++ strings. Let's say string text = "0R14" and I access each element using text[0],text[1] etc does text[0] return an integer 0? or a character '0'? if it doesn't return an integer, how do I convert individual string element to integer type if I need … | |
hi... can anyone can tell me the code to animate a trinagle in c language? | |
Hi All. I have created a message box using Win32 API messageBox() function. Now I want to move a button on that message box a little higher. I'm trying to get that by the following code, but when executing the code only the button is moving, leaving its background in … | |
First off, you should know I just started learning C++ today. Anyway, whenever I type in my code to Dev_C++ Compiler, and then try to run it, it always says "Source file not completed." Here's my code: [CODE]// operating with variables #include <iostream> using namespace std; int main () { … |
The End.