49,761 Topics

Member Avatar for
Member Avatar for suman holani

Hi , M Using the boost library for shared memory . where internally this locking takes place. But due to some reason thread holding the lock died .So when other thread tries to lock the mutex. I t should throw EOWNERDEAD. But here it hangs. (gdb) s 358 mp_mutex->lock(); (gdb) …

0
47
Member Avatar for webdragon89

I need to write an overloaded function for a pascal triangle. I have to include another function that fits n!/((n-r)!r!), I can't figure it out. Help please! This is what I have so far: [code] #include "stdafx.h" #include <iostream> using namespace std; int my_fib(int,int); int x,y,j; int main() { x=0; …

Member Avatar for kvprajapati
0
107
Member Avatar for wot

Hey guys, I'm new to C and I am trying to find a way to create a file with the following array: [code] char peer1_0[] = { 0x0c, 0x4c, 0x08, 0x00 }; [/code] The original array has a lot more data, but I am just needing a simple example or …

Member Avatar for Kurt Kubing
0
158
Member Avatar for Dimitar

I think I have a good starting point on this, but I still need some help :) First I need to ask the user for the limits of integration and the error tolerance, (that's already done). So when I divide the trapezoid (when the end points are connected) in 2, …

Member Avatar for nezachem
0
160
Member Avatar for Chetan_

I have to give this in around 10 hours and i still have lots to do. Please report any bugs; Its a scientific calculator, also supports [B]sin, cos,tan and log [/B] Take care to [B]put the entire expression under brackets[/B] For example, a valid input will be:- (5+4*-3+sin(43+7)+cos(90/2)) I've attached …

Member Avatar for Chetan_
0
200
Member Avatar for Monster Killer

i am trying to make a quiz using Visual c++ I am trying to make it so that each tab has a different question and when you press a button it goes to the next tab. Is there a way to do this? If not is there another way i …

Member Avatar for Monster Killer
0
131
Member Avatar for blue:

[code] #include <iostream.h> #include <fstream.h> #include <math.h> void main () { cout<<"**********************welcom*******************"; float n,j,q,d,h,t,i,m,f,b,v; cout<<"\n num of eng = "; cin >> j; n=j ; q=0; d=0; h=0; t=0; v =0 ; for (i=1;i<=n;i++) { v = i; cout<<"\n\n ** Engineer ID "<<v; cout<< "\n\n insert Salary = "; cin>> …

Member Avatar for blue:
0
115
Member Avatar for daviddoria

I want to make a type to differentiate degrees and radians. I wanted something like this to produce a compiler error: [code] #include <iostream> typedef double Degree; typedef double Radian; void MyFunction(Radian angle); int main() { Degree foo = 3.0; return 0; } void MyFunction(Radian angle) { std::cout << "Success." …

Member Avatar for Narue
0
106
Member Avatar for pnk1

Hey does anyone have library management project which does not include " graphics" header file ?? Pl help n reply

Member Avatar for Salem
0
50
Member Avatar for #define

hello every body! i have very simple question, i google it alot but i didn't find the satisfactory answer my question is what is the reason that [B][I][U]int, float,char,double,boo[/U][/I][/B]l are of [B][I][U]4,4,1,8,1[/U][/I][/B] byte respectively in C++? are [B][I][U]arrays built in[/U][/I][/B]? if yes then kindly explain......thnx alot

Member Avatar for Narue
0
107
Member Avatar for fuggles

Does anyone know of a good tutorial on how to send data through a USB port? I've lately been trying to link my programming skills with my electronics skills. Thanks for your help. :)

Member Avatar for Salem
0
81
Member Avatar for phpangel

hi guyz i need ur help, i have this game with 5 files: 2 header files 3 cpp source files, we i compile it i get this error: error C2065: 'i' : undeclared identifier plz check the attachment, the files are there appreciate the answer :).

Member Avatar for tux4life
0
949
Member Avatar for LemonLemon

I am wondering how to draw the mif data(map data) on the window using Visual C++ Can anyone give some idea or sample code?

Member Avatar for Salem
0
54
Member Avatar for Izarian

Okay, so C++ has no specific byte class, but what they do have is an unsigned char class to convert ints/doubles/floats to binary/bytes. In trying to convert some Java to C++, I am trying to keep some of the function signatures the same or close to the same, and in …

Member Avatar for Salem
0
276
Member Avatar for sexyzebra19

I've just read up about pointers, so wanted to see if I can try and use them in my program. I have the function "equation", which at present is t^2. I also have the function "gauss", in which I am going to use the equation t^2, (code for this is …

Member Avatar for sexyzebra19
0
93
Member Avatar for Monster Killer

I am trying to create a button that turns off a panel but when i debug it i get 'error C2064: term does not evaluate to a function taking 1 arguments' [CODE] private: System::Void go_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) { this->panel1->Visible(false); this->panel1->Enabled(false); }[/CODE] I would really appreciate some help. Thanks

Member Avatar for Monster Killer
0
95
Member Avatar for Skeen

So I'm working on this game, and I've been using "glaux.h" to load my textures, however I'm interrested in using JPEG's, so I found an example to do this on: [url]www.morrowland.com[/url], however, when I compile it (after fixing the errors), then I get this, on the linking state, any help …

Member Avatar for Skeen
0
107
Member Avatar for webdragon89

I have n!/((n-r)!r!) which I figured out how to make recursive: [CODE]int crn (int n, int r) { if (r==0||r==n) return 1; return (n-1)+(n-1,r-1); }[/CODE] how do I make it non-recursive?

Member Avatar for Agni
0
120
Member Avatar for NickRx

Hey, I'm new to programming in C++ So I just got done writing this and everything seems fine to me, but I got an errors. I've had many problems with compilers in the past, but I'm not sure if this is from the code or the compiler. If it helps …

Member Avatar for Nick Evan
0
111
Member Avatar for zero_crack87
Member Avatar for sidra 100

plz chk my code its giving error at line 45,49.also does it satisfies the requirement Problem Statement: Suppose we have a class named as Train it has two constructors, two methods, and a single attribute each of which described as follows:· One attribute:maxSpeed – an int value representing the maximum …

Member Avatar for sidra 100
0
123
Member Avatar for anantha_krish

Hi All, I am new to this C++. Am using Borlnd c++ builder. I need a code for combo box. It should work like, when i select any text from combo box, it should display related infromation in the panel say in "RichEdit" in Borland C++ builder. Can anybody please …

0
43
Member Avatar for notsogood

Hi everyone, I am writing an[URL="http://www.8puzzle.com/8_puzzle_problem.html"] 8-puzzle Problem[/URL] Solving Program that utilizes the [URL="http://en.wikipedia.org/wiki/A*_search_algorithm"]A* (A Star) search algorithm[/URL]. I've come this far in completing the desired program, and somehow summed up to this: (entire source code posted below). But I can't compile it just yet due to this builder error: …

Member Avatar for thomas_naveen
0
128
Member Avatar for XiaO yuEn

Input a number between 1-9, then choose 2 character, e.g: * and =. The sample output: Enter number: 5 Enter character: * = * == *** ==== ***** I had tried many times, but don't know where i was doing wrongly. Please help, thanks!:) [code] #include <iostream> using namespace std; …

Member Avatar for rohitn
-1
108
Member Avatar for asa88

i need to write a class for driver.cpp file [CODE] // Chapter 13, Programming Challenge 3 Driver // #include "Car.h" #include <iostream> #include <string> using namespace std; int main() { // Loop counter int count; string myMake="Porsche"; // Create a car object. Car porsche(2006, myMake); // Display the car that …

Member Avatar for asa88
0
135
Member Avatar for noey699

Everything compiles fine but it does not identify a straight. It will find straight flush though. A hand consists of 5 objects of the class CARDS which has 3 int variables(Value, Suit, Position). When I send a straight through it it goes all the way through to else and returns …

Member Avatar for noey699
0
149
Member Avatar for trigg0n

I got a question regarding sorting multiple strings that are entered as such, i need to sort them so that if the list would look like this, i just cant seem to get the strings to be swapped, do i need to be using strcpy? Any help would be great …

Member Avatar for mrnutty
0
124
Member Avatar for mikabark

I'm doing assignment. If I use getopt_long, I can't use both argument like -vo, but -verbose -open is ok. I want to use both `command -vo ~~` and command `-verbose -open ~~` WIll you help me? Thanks you. int main(int argc, char * argv[]) { using namespace std; int c; …

-1
59
Member Avatar for iammfa

Hi all, I'm beginner in c++, I'm trying practice on c++ basics, since few minutes I tried practice "setw" operator, I wrote this trivial program to print some data in console screen, but when I tried build it it gave me error..! [CODE]//print game names and my prefer rating in …

Member Avatar for WaltP
0
223
Member Avatar for Dimitar

Hello everyone! I need to ask the user for a function say: X^5 +7 and I need to ask him separately for the value of X, so I can calculate it then. I really don't know how to store the function and then manipulate it! Thank you!

Member Avatar for Dimitar
0
83

The End.