49,761 Topics
| |
comment should explain what im trying to accomplish...not sure how i should approach this problem tho [CODE] fileWork::fileWork(const std::wstring& processName,const std::wstring& fileName) // i want to use initializer list, but how can i do so if i want the function arguments to be checked first...before any class members are initialized? … | |
Hi guys, I am trying to load a Haptik.hpp to control a Novint Falcon. I receive error C2144 syntax error and C4430 in the next line [CODE] //---FUNCTION // Desc: C-based entrypoint to retrieve IHaptikLibrary interfaces //-------------------------------------------------------------------------------------------------------------> extern "C" HAPTIK_DLL_IMPORT_EXPORT PVOID GetHaptikLibraryInterface(IN UINT32 interfaceId = HAPTIK_IHAPTIKLIBRARY); [/CODE] So I pasted … | |
hello guys...im getting this error. Looked for this but could not find some solution [CODE] error C3861: "xxxxx" identifier not found [/CODE] How can I fix this error? thnx | |
The C++ I/O system supplies an interface to the programmer that is independent of the actual device being accessed. This interface is known as stream. The I/O system contains a hierarchy of the stream classes used to define various streams to deal with the console and disk files. These classes … | |
Hi there, if I call a double function like [CODE]double MyPrice( ) { return cost; }[/CODE] (value "cost" assumed to be set to 7.00 why this function returns 7 and not 7.00? thank you | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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; … | |
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 … | |
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...) | |
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 … | |
where can I find a code/ready program in C++ graphics of a rotating body. appreciate your time.thanks | |
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. | |
[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] |
The End.