49,761 Topics
| |
Need help with the C++ programming. I am trying to compute the count of values, the average, and the standard deviation of the input given by user. My output is correct except for the standard deviation. My code is below: Thanks [code]#include <iostream> #include <string> #include <cmath> using namespace std; … | |
Below is my code for a class car efficiency program but I have some errors with the get_gas function. if you can help would appreciate it. [code] #include <iostream> #include <cmath> #include <cstdlib> using namespace std; class Car { public: Car(); Car(double); ~Car(); void add_gas(double); double get_gas(double); void drive(double); private: … | |
Hi, I'm very new to programming. I have Visual C++.net and I want to know how to create a program in C. The software is automatically adding the .cpp extention to all of my projects, but I want files with the .c extension. Thanks :eek: | |
Hello All, I posted this over in the Software Forum, but I realized that maybe it belongs over here. I have both VS 6.0 and VS .Net 2003 available to me. I am just starting to learn programming and wanted to know the difference and which one would be the … | |
this program contains everything even leap year: :idea: i am a beginner in cpp (we have this in school so i am learning this age 15 ) [code]# include<iostream.h> # include<conio.h> void main (void) { clrscr(); int years1, months1, days1; int monthdays1[12] = {31, 59, 90, 120, 151, 181, 212, … | |
Can anyone lead me in the right direction to get this to work??? my << overload compiles fine... ofstream& operator<<(ofstream& ofs, const GameBoard& b) //overloaded ofstream operator to save board & piece { for (int row=0; row < b.size; row++) { for (int col; col < b.size; col++) { ofs … | |
hi there this is my first time I post here, Ive taken some courses in C++ and Iam on my own now, but there are still alot of basic issues I need to work on so please do not mind the following question: Iam working on a chess interface and … | |
Write a C++ program that has class 1) math Math class has only one data member number and member function display that will display the data member number. Write the constructor of your math class that will initialize the data member number with the value zero. Program will overload the … | |
I'm using VC++.NET and drag a couple controls onto the form. When I edited the auto-generated code for a control in InitializeComponent(), the controls on the form disappears. When I tried to add them back, it complained that it's already there. Eventhough the form no longer has the controls, it … | |
Attached is a tiny program in which the function F has as an argument the function pointer double (*f) (double). F returns the sum f(1)+f(2)+f(3)+f(4). (Naturally, I have a much more interesting application in mind, but this simple example makes the point.) What I really want to do is replace … | |
Ok so Im working on my last lab for class and I decided to try to do it in object oriented since thats what my next class is pretty much all about. Never hurts to get a head start. However Im having difficulty figuring it out from the book. Can … | |
Hello ladies and gents, Ive been reading about how when a class becomes to big due to to many memberfunctions, it is best to split the program up into several sections wich could be something like this: Interface section Implemenation section Application section I was given an example wich is … | |
Please see this question topic: [url]http://www.daniweb.com/techtalkforums/thread27020.html[/url] | |
I need to be able to use system functions on turbo c++ 3.0 on windows XP. I require this for my school project and I am restricted to this particular compiler and OS (modern OS and old compiler..i love my school :confused: ). Is there anyway in which in i … | |
I'm new to Visual Studio .NET. I thought C#.NET replaces VC++ 6.0 until I saw that C++.NET was still around. So, what's the difference between the two? I want to create a GUI that uses some C++ header/source files and a C++ socket library. Which would I use? I have … | |
I'm trying to compile the following class code and keep getting errors on the overload functions. Everything else compiles ok. I've looked at several sources and compared the syntax and I don't see where the problem is. Please help??? header file [code] #ifndef GAMEPIECE_H #define GAMEPIECE_H #include <iostream> #include <cctype> … | |
Hopefully I can ask this clearly. Basically I'm wondering if I have a structure like so: struct MyStruct { char fieldA[20]; char anotherField[15]; int andAnother; char lastField[30]; }; Is there a way to dynamically print out it's contents? [fieldA] = "ABCDE" [anotherField] = "TEST" [andAnother] = 5 [lastField] = "WHATEVER" … | |
I'm trying to put together a tic tac toe game for a c++ class. Requirements are that it have two classes - gameboard and gamepiece. The gameboard I've pretty much taken care of, but I'm confused on how to set up the gamepiece class. Here's the requirements as given to … | |
Hello everybody! I'm quite new to C++ and as exercise I had to write a simple program, trying to duplicate the strcpy(), strlen() and strcmp() functions in C++. The code seems to be ok from syntax point of view but the results are quite unsatisfying :o. If anyone could point … | |
Hi everyone, Just wondering if anyone is interesting in starting a new forum for using ACE? I am new to both ACE and network programming using C++. Thanks! ej | |
I know this is very simple but I cannot remember how to underline a string in C++. Can someone please help. | |
Okay I use Dev-C++ as my IDE. I have never linked my own files. I am pretty much a noob on C++, but not to programming in general. My issue that I have been almost pulling my hair out with is this. I am using a premade MD5 header file … | |
I have 2 problems in C regarding floating point, please help : Q1 Output of the following code- C. [CODE] main() { float a=0.7; if(a<0.7) printf("C"); else printf("C++); } [/CODE] But if we change the if condition from a<0.7 to a<0.7f we get output- C++. Q2 The following code gives … | |
I am having a little trouble with my program assignment. I don't want the answer I just need pointed in the wrtie direction. I cannot get my program to loop. The program prompts user to enter hours worked and calculates and displays. The it asks the user to enter y … | |
Hello ladies and gents, Ive been reading about when you have a very large program, that it is advisable to divide this into several modules. Ive tried this out with an example of two separate modules that where given as examples and managed to get two .cpp modules into the … | |
Hi.. Can someone please tell me how to send a HTTP request through a C/C++ program?? Thanks. | |
Hello... How can I check whether My computer is connected to the INternet or not using a C++ program.. I am using VC++ compiler......and OS is WinXP.. bye. | |
Hello ladies and gents, I'm trying to output a 2D array, but can't seem to find the solution, can anyone help me out here. [code] #include <stdafx.h> #include <iostream> using namespace std; int main() { int **pp; int i, j, n, ni; cout<<"Geef het aantal regels als volgt: "; cin>> … | |
My program does take the inputs from user and does not given required results and also does not check the employee is a manger or programmer. Please some one check my code and correct it or write a better coding for this program. Code and program details is given below.Thanks. … | |
I've gotten feedback from my instructor to modify my code because it contains poor design techniques. I need to add a " return " after each function without it going back to " main " and also to avoid the use of global headers. I've tried to modify it several … |
The End.