49,761 Topics

Member Avatar for
Member Avatar for zeus1216gw

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 …

Member Avatar for zeus1216gw
0
137
Member Avatar for Froboo

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 …

Member Avatar for Ancient Dragon
0
727
Member Avatar for JudithMCA

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 …

Member Avatar for Ancient Dragon
0
143
Member Avatar for u8sand

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 …

Member Avatar for u8sand
0
215
Member Avatar for XTRobot

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 …

Member Avatar for XTRobot
0
277
Member Avatar for lotrsimp12345

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()=='"' …

Member Avatar for jackcppi2
0
289
Member Avatar for zeus1216gw

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 …

Member Avatar for tux4life
0
172
Member Avatar for lotrsimp12345

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?

Member Avatar for tux4life
0
133
Member Avatar for 9323170

hello every body i need code open/close CD Rom in Borland C++.please tell me.it is very important for me.

Member Avatar for Salem
0
106
Member Avatar for mathueie

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

Member Avatar for Salem
0
271
Member Avatar for tomtetlaw
Member Avatar for sampsont

Does Eclipse CDT (C++) produce a file that lists the symbols and addresses of the linked program? Thanks!

Member Avatar for Salem
0
60
Member Avatar for lotrsimp12345

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.

Member Avatar for lotrsimp12345
0
129
Member Avatar for ermithun

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 …

Member Avatar for Hiroshe
0
181
Member Avatar for gretty

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 …

Member Avatar for Nick Evan
0
265
Member Avatar for yuenli

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 …

0
48
Member Avatar for xcktinios

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 …

Member Avatar for StuXYZ
0
85
Member Avatar for dorkwad

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???

Member Avatar for Tom Gunn
0
94
Member Avatar for ermithun

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.

Member Avatar for ermithun
0
199
Member Avatar for tomtetlaw

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.

Member Avatar for kvprajapati
0
43
Member Avatar for zeus1216gw

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> …

Member Avatar for nirav99
0
101
Member Avatar for jjplaw

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 …

Member Avatar for jjplaw
0
128
Member Avatar for ermithun

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 [ …

Member Avatar for ermithun
0
105
Member Avatar for mrgreen108

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 …

Member Avatar for mrgreen108
0
123
Member Avatar for lotrsimp12345

//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; } …

Member Avatar for lotrsimp12345
0
142
Member Avatar for su_candy

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. …

Member Avatar for su_candy
0
161
Member Avatar for crash1989

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 …

Member Avatar for crash1989
0
638
Member Avatar for timos

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; …

Member Avatar for athlon32
0
123
Member Avatar for Stormy_Weather

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. …

Member Avatar for tux4life
0
232
Member Avatar for lotrsimp12345

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 …

Member Avatar for daviddoria
0
146

The End.