49,761 Topics
| |
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) … | |
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; … | |
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 … | |
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, … | |
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 … | |
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 … | |
[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>> … | |
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." … | |
Hey does anyone have library management project which does not include " graphics" header file ?? Pl help n reply | |
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 | |
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. :) | |
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 :). | |
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? | |
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 … | |
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 … | |
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 | |
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 … | |
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? | |
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 … | |
| |
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 … | |
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 … | |
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: … | |
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; … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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! |
The End.