49,757 Topics

Member Avatar for
Member Avatar for vbx_wx

Hello ,I want to implement a client server program,but I wish to use more OOP into the design(inheritance,virtual....),I only come up with this design and I nedd some pointers what can I do better,any sugestions will be welcome,Thanx [code] class TCPSocket { public: virtual void send(std::string buffer_m) throw(Error); virtual void …

Member Avatar for vbx_wx
0
127
Member Avatar for steve_Student

Hi I am creating an program for my degree, it’s a program that logs call times, days, gives total cost and discounts depending on days of the week, at the end of the program it out puts all results then give an option to start over again or exit. So …

Member Avatar for steve_Student
0
148
Member Avatar for sha11e

The error i get is: 'user:input' undeclared[first use this function] [CODE]#include <iostream> #include <cmath> using namespace std; int main() { // declaring variables \\ string user_input; // end of declaring variables \\ cout <<"Hello and welcome to Mr. Nightwish's lab of crazy!" <<endl <<endl <<"Please choose one of the following …

Member Avatar for mitrmkar
0
85
Member Avatar for rlhh

Deck.h [ICODE]#include "stdafx.h" #ifndef DECK_H #define DECK_H class Deck { public: struct card{int symbol; int value;}; int symbol; int value; card card_list[52]; card deck[52]; card community[5]; card player1[2]; card player2[2]; card player1_hand[7]; card player2_hand[7]; void generate_deck(); void shuffle_deck(); void deal_cards(); int main(); private: static int const diamond = 1; static …

Member Avatar for Clinton Portis
0
90
Member Avatar for TristanS

Hi Guys, I'm currently underway developing an in-house 3D game engine for my studio here in Australia. I'm new to the gaming industry and obviously still an indie developer, though I've modded games for a couple of years now. However, I have quite a few years experience (4-5) in software …

Member Avatar for TristanS
0
242
Member Avatar for BladeCoder

i need some help see i have to write code for an array of 20 strings and i have to modify the binary search function im using to accomodate for strings instead of ints i know i still have to sort it so that binary search will work but my …

Member Avatar for ritasea
0
1K
Member Avatar for Annettest

I am trying to compile a program using make on Mac OS X with gcc4.2. But I'm getting this error: fpu_control.h: No such file or directory I have never had a problem with an include file before and I'm rather confused! I have googled fpu_control.h, but I can't find anywhere …

Member Avatar for SgtMe
0
1K
Member Avatar for johnloiebert

1.function that orders the stored values of three characters.Suppose,for example,that c1,c2,and c3 are character variables having the values C,B,D respectively,then the function call order_chars(&c1,&c2,&c3)should cause the stored values of c1,c2,and c3 to be B,C and D respectively 2.Write a program that reads n integers into an array, and then prints …

Member Avatar for jonsca
-1
140
Member Avatar for blackxswil

I have 2 classes: 1. Student 2. Course Under the Student class I have the following: class Student { private: string StudentName; public: string name (); void changeName(string); void registerCourses(Course course); void displayCourses(Course course); }; The method "void registerCourses(Course course)" & "void displayCourses(Course course)" using the Course class. Under the …

Member Avatar for geojia
0
181
Member Avatar for gunbuster363

I am trying to learn to program with glut. In a tutorial, I see the author created 2 projects, one is win32 console application, another is win32 application. If I happen to use int main() in win32 application/ WinMain() in win32 console application, the project will be dead. I would …

Member Avatar for gunbuster363
0
126
Member Avatar for mslade

Hi everybody, this is my first post here. I'm trying to find out why lib_ncurses' initscr() is failing on me, so I compiled a quick program that runs it and attached gdb to it. I've only used gdb a few times, so I think I might be misinterpreting what I'm …

0
109
Member Avatar for Obsidian_496

Hello. I have a problem with one part of my homework. I'm not exactly sure how to say this in English. I want the constructor to build an object and assign string values to attribute1 and attribute2. I'm only posting the relevant part of my code. My class can be …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for guy40az

Can anyone tell me if there is a way to make your own variables for real numbers. I need at least 30 digits of precision so it would have to be a 128 bit or 256 bit variable. Is there a way to make your own variables using a header …

Member Avatar for Ancient Dragon
0
59
Member Avatar for lochnessmonster

is it bad programming practice or perfectly normal to design a class, in which there is no public member function which can check the status of the objects state? for example what if i implemented it so the object was assumed successfull....until an exception is thrown? is this OK to …

Member Avatar for mike_2000_17
0
127
Member Avatar for princeess

hiii everyone i am developing a code in which the there is one robot & we need to move it towards a target in 3 diff moves....the project may extend to multiple robots were each robot ahve a style of walking(either ...acros length, or breadth or diagonal....ie...plane is a rectangular …

Member Avatar for TristanS
1
90
Member Avatar for yongj

I have an assignment where I need to make a utility where if ran, it would perform the same action as a tee command in linux. So the tee command takes the command line: ls *.txt | tee txtfiles.txt But for my assignment if I named the utility to be …

Member Avatar for daviddoria
0
165
Member Avatar for altXerror

i'm having problems with this code. it's supposed to be a simple loan calculator i had to fix, but i can't get it to work. my freinds told me it wasn't possable to complete using 'catch', 'try' and 'throw' (not using throw), so i attempted to fix it with that. …

Member Avatar for SgtMe
0
209
Member Avatar for oristt

hi, i have a program to make but i don't now how to make it, i am new in c++ to make: Create a program that has two char-Aray and fill it with two texts, namely: "Microcontellers" and "microcontrollers with source boost". tell the program to search the first letter …

Member Avatar for Software guy
-1
81
Member Avatar for rizzi143

HI! could anyone help me out in editing the following code so that the list of number is displayed in ascending order. thanks. #include <iostream.h> void main() { int count; cout << "Enter a number: "; cin >> count; while (count > 0) { cout << count << endl; --count; …

Member Avatar for Fbody
0
132
Member Avatar for Weird Nerd

Hello, I am using OpenGL in C++ to create graphics in a program of mine. In the window, there is the main section and a sidebar. My problem is that I do not know how to relocate the vanishing point in my window. Currently, it is at (0, 0), which …

Member Avatar for Weird Nerd
0
505
Member Avatar for lochnessmonster

from my understanding,RAII is where u make an object out of something that performs allocation on the heap to release its resources back to the O/S? (heap allocation,opening streams,file handles,etc...)

Member Avatar for drkybelk
0
71
Member Avatar for wickedflo

please help me.... i need some help on how to get the grades of this program and also can u please correct it... cause i think something is not right... #include<iostream.h> int A[5]; int ctr; main() { ctr=5; while(ctr<5); { cin>>A[ctr]; ctr=ctr +1; } cout<<A[5]; ctr=5; do { cout<<A[ctr]; ctr=ctr …

Member Avatar for alaa sam
0
181
Member Avatar for joe00

where can I find a code/ready program in C++ graphics of a rotating body. appreciate your time.thanks

Member Avatar for joe00
0
75
Member Avatar for flide

is it possible for 2 classes access the private data members of each other without being related in any way(I mean inheritance) and still have privacy as far as other classes are concerned... something like friend functions ----> friend classes.

Member Avatar for jonsca
0
32
Member Avatar for muthu1802

[CODE]int i=5,j=6; int k=i++ + i++ + ++i + i++; int m=j++ + j++ + j++ - j++; cout<<i; cout<<m; cout<<j; cout<<k;[/CODE]

Member Avatar for Fbody
0
89
Member Avatar for sharifyboy7

Implement the template class SortedList. Write a simple driver that reads values from file float.txt, inserts them into the list, prints the length of the final list, and prints the items. Add code to your driver to test the remaining member functions. Delete 3.3, 10.0, and 200.0 and print the …

Member Avatar for daviddoria
0
155
Member Avatar for HBK_100

[CODE] void RB_number() { int roomnumber; string category; string type; string status; float rate; int roomid; //Try,catch and throw statement for exception handling to catch errors that are inputed from the user try { cout<<"\n\n\t\t\tEnter the Room ID you wish to view:"; cin>>roomid; if(roomid < 0) throw "Error"; } catch(string) …

Member Avatar for daviddoria
0
107
Member Avatar for fu1five

This is C++ How to Program 7th Edition. I have to Modify the Package shipping program to include exception handling. Here is the code please help me modify this i started abit stuck need help exception handling. [code] // ExceptionHandling.cpp : Defines the entry point for the console application. // …

Member Avatar for daviddoria
0
194
Member Avatar for muthu1802

int k=i++ + i++ + ++i + i++; int m=j++ + j++ + j++ - j++; cout<<i; cout<<m; cout<<j; cout<<k; what is the precedence in linux compiler

Member Avatar for Ancient Dragon
0
184
Member Avatar for MyPianoSucks

Hey everyone, Today i was just studying C++ and i needed to do a simple program with a "GradeBook.h" file, a "GradeBook.cpp" and a "main.cpp".Just to test how class works . I had already wrote all source code for this files, but when it cames to compile nothing appears, i …

Member Avatar for MyPianoSucks
0
186

The End.