49,761 Topics

Member Avatar for
Member Avatar for djbsabkcb

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

Member Avatar for djbsabkcb
1
490
Member Avatar for djbsabkcb

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

Member Avatar for djbsabkcb
0
165
Member Avatar for Charliebot

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:

Member Avatar for Narue
0
115
Member Avatar for bandm

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 …

Member Avatar for Narue
0
202
Member Avatar for cpp noob

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

Member Avatar for cpp noob
0
134
Member Avatar for M Tritt

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 …

Member Avatar for M Tritt
0
129
Member Avatar for shakoush2001

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 …

0
62
Member Avatar for shahid

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 …

Member Avatar for alc6379
0
149
Member Avatar for DotNetUser

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 …

0
49
Member Avatar for murschech

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 …

Member Avatar for Dave Sinkula
0
216
Member Avatar for renork

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 …

0
79
Member Avatar for JoBe

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 …

Member Avatar for JoBe
0
493
Member Avatar for Jay J

Please see this question topic: [url]http://www.daniweb.com/techtalkforums/thread27020.html[/url]

Member Avatar for Catweazle
0
77
Member Avatar for Jay J

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 …

0
291
Member Avatar for DotNetUser

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 …

Member Avatar for darklordsatan
0
223
Member Avatar for M Tritt

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

Member Avatar for Dave Sinkula
0
228
Member Avatar for winbatch

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

Member Avatar for Rashakil Fol
0
107
Member Avatar for M Tritt

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 …

Member Avatar for M Tritt
0
1K
Member Avatar for freemind

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 …

Member Avatar for freemind
0
99
Member Avatar for EricaJanine

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

Member Avatar for alloy_zeus
0
262
Member Avatar for somer2412

I know this is very simple but I cannot remember how to underline a string in C++. Can someone please help.

Member Avatar for robgxxx
0
121
Member Avatar for JSThePatriot

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 …

Member Avatar for oboler
0
145
Member Avatar for akshayabc

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 …

Member Avatar for akshayabc
0
135
Member Avatar for mav1

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 …

Member Avatar for varunpuri
0
172
Member Avatar for JoBe

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 …

Member Avatar for JoBe
0
238
Member Avatar for numerouno543

Hi.. Can someone please tell me how to send a HTTP request through a C/C++ program?? Thanks.

0
56
Member Avatar for numerouno543

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.

0
64
Member Avatar for JoBe

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

Member Avatar for JoBe
0
582
Member Avatar for shahid

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

0
76
Member Avatar for yaan

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 …

Member Avatar for BruceWilson512
0
179

The End.