49,761 Topics
| |
I'm using poisson's process for probability. This is the equation I'm using : P(x)= ((lamda^x)*e^(-lamba))/x! it's the factorial part I'm not getting right though. I can get the first 3 probabilities right (0,1,2) but everything after that starts to be off by half and so on. Look I know the … | |
Good evening dear programmers, As of Windows Vista, [URL="http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx"]SHGetFolderPath[/URL] is deprecated, and replaced by SHGetKnownFolderPath. However, my program must be compatible with both OS versions. I used GetVersionEx to determine the version of the OS that the user uses, but the problem comes later on: [B]main.cpp `SHGetKnownFolderPath' undeclared (first use … | |
hello! Im trying to use _popen to execute a cmd app from a WFA using this code.... Im including stdio.h [CODE]_popen("\"d:\\Freeling\\bin\\analyzer.exe -f d:\\Freeling\\share\\config\\es.cfg\"", "r"); [/CODE] This code straight excecuted from the cmd console, works. But the popen inst working not even excecute the cmd console it seem like is going … | |
Hey guys, I was looking at a program that "extended" taskmanager by attaching a dll to the taskmanager's process. I was wondering how this is done and how they were able to add new features and everything. Before you tell me please be aware that I know what a dll … | |
Hi again,first i must say that i am familiar with c++ but only console programming. I am beginner so can you please be more gentle. I want to move on programming with buttons,windows,check boxs,input box and so on,i have heard of API and GUI what is the diference ? They … | |
so input would be Q1,2,3-5 output would be do problems 1,2,3,4,5 of Q [code] #include <iostream> #include <cstdlib> #include <sstream> #include <string> using namespace std; int main() { cout <<"enter the problemset and number""\n"; //problems represents name and numbers string problems; char quote; char num; string number; //gather name if(cin.peek()=='"' … | |
I need some help getting this factorial to work. I don't think I'm getting this to work right since only the first 2 work in the series. I probably could write a function to fix this but there has to be a way to loop it instead. This is what … | |
i have created a C string of my variables and guessing i need some king of loop to check each character after it gets it? | |
hello every body i need code open/close CD Rom in Borland C++.please tell me.it is very important for me. | |
Hi, How to get directory size? Recursive alogrithm take more time for calculating directory size. so I don't like search a recursive algorithm. Any other method | |
Does Eclipse CDT (C++) produce a file that lists the symbols and addresses of the linked program? Thanks! | |
so i find the period or whatever the sentence ends in. Then I create a substring from that and delete the part which contains the end character. Then i keep count of it. | |
Hello friends, i am facing issues while finding the reason for a segmentation fault in a CPP-application. Please let me know how to move forward to look for this error, i have a doubt on the following code snippet as this CPP code uses malloc function instead of new. can … | |
I am learnign c++ & I am confused as why or when I would use a struct, class or enumeration In laymans terms how would you describe what a [B]Struct[/B] is, what a [B]Class[/B] is & what a [B]enumeration[/B] is? When I say what are they I mean what are … | |
Hi, I am trying to connect to sql server by using ADO to insert a record via stored procedure. I keep on encountering this error message (Source: Microsoft OLE DB Provider for SQL Server Description: The precision is invalid.)I had read on several blogs and forums and it said that … | |
Hi!I'm working on a project at university and I need your help!I have to make a class Image that will represent the image's pixels either using th RGB scale or the gray one. The existing classes are RGBpixel and graypixel.I think I have to do it using templates,so generic functions … | |
Hey,new to stl, in c array, we can declare an array like [CODE]int a[]={2,4,5,6,7,7}[/CODE] how can u do it for a vector without pushing back n times??? | |
typedef std::list<LDAPCtrl> CtrlList; typedef CtrlList::const_iterator const_iterator; please help me in understanding the above typedef statements as we know that typedef syntax is, typedef <attributes> datatype aliasname Thanks. | |
When my program starts, I want it to put a text edit control in the window, just like notepad, how do i create text controls? I am using the Win32 API. | |
I'm trying to write a program in C++ that will tell the user to input 5 numbers and it'll display the largest number and whether it was the 1st, 2nd 3rd...so on entry. any help? this is what I have so far #include "stdafx.h" #include <iostream> #include <math.h> #include <iomanip> … | |
Hi, I'm a newbie in this vast world of programming. I've been given some codes in C which are compiled & linked using makefile. I can compile the code using nmake from VS2005. Now i want to build the program in C++ VS2005 IDE. From a quick google search, there … | |
Hello, Can anyone please help me in understanding the below as i need to debug it for finding out the reason for signal 11 in the code, Caught fatal signal 11 (Segmentation Fault) utl_dump_stack: Start of stack trace (using walkcontext) for pid 17461 /data/runtime/mycode/LDAPv3SL/prodlib/libLDAPv3SL_impl.so:std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::iterator std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::erase(std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::iterator,std::list<LDAPCtrl,std::allocator<LDAPCtrl> >::iterator)+0xf4 [ … | |
I am writing a simple triangle calculation of sides and angles program, and the final thing that the professor wants is the type and the class of the triangle. I have written two functions that are prototyped here: double calcSide( double s1, double s2, double ang3 ); double calcAngle( double … | |
//main [code] #include <iostream> #include <cstdlib> using namespace std; #include "libro.h" int main() { test ab; cout<<"enter width limit"; int length; cin>>length; ab.alternate(length); } [/code] //implementation [code] #include <iostream> #include <cctype> #include <cstdlib> using namespace std; #include "libro.h" int test::alternate(int width) { //for odd, 3 char-ellipsis if(width%2==1) { keep=width-3; } … | |
Hi all, I'm working on creating an application whcih acquires image data from camera and display it. I have right now acquired image data in the form of long* array. I would like to visualise this data. I am not sure how to display the array values as an image. … | |
I found this question in some programming contest.. Given are N squares with side 1. How many "different" rectangles can one form using these squares? Two rectangles are considered different if none of them can be rotated and moved to obtain the second one. During rectangle construction, you can neither … | |
When I try to compile this code [code] using namespace std; #include <iostream> class COne{ protected: int a; public: bool is_equil( COne & other){ if ( a == other->a) return 1; else return 0; }; int seta(int val){ a = val; return 0; }; }; int main(){ COne a, b; … | |
Hi, We are new to Visual Studio 2008, barely a month into a C++ course, and are currently working on a few personal projects. We have successfully created a console application with Visual Studio but are not sure on how to get the program to run outside of Visual Studio. … | |
the error is on line 32 of my main program //interface file [code] #ifndef STREXTRA_H_INCLUDED #define STREXTRA_H_INCLUDED #include <iostream> using namespace std; class search { public: int find(unsigned char mystring,char letter); int find(char mystring[],string word); }; #endif // STREXTRA_H_INCLUDED [/code] //implementation [code] #include <iostream> #include <cstdlib> using namespace std; #include … |
The End.