Posts
 
Reputation
Joined
Last Seen
Ranked #130
Strength to Increase Rep
+14
Strength to Decrease Rep
-3
87% Quality Score
Upvotes Received
157
Posts with Upvotes
134
Upvoting Members
88
Downvotes Received
25
Posts with Downvotes
23
Downvoting Members
13
50 Commented Posts
7 Endorsements
Ranked #260
Ranked #104
~551.56K People Reached
About Me

I am currently working on a Ph.D. in Electrical Engineering at Rensselaer Polytechnic Institute. I work in the field of computer vision and image processing. My current research deals with 3D data analysis, particularly from LiDAR scanners and mutli-view…

Interests
Engineering Education Jazz Saxophone Woodworking
PC Specs
Fedora
Favorite Tags
Member Avatar for Airlike

Are you having trouble with the logic of the elevator operation or some syntactical thing about how to pass your array? A small note: `bool exit;` - you should not use 'exit' as a keyword. It is very likely used in other libraries etc. I know exit() is usually a …

Member Avatar for trueframe
0
7K
Member Avatar for daviddoria

I am trying to use wxPython (the version that ships with Fedora 11 - I'm not building it from source). I am seeing: [code] from wxPython.wx import * File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wxPython/__init__.py", line 15, in <module> import _wx File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wxPython/_wx.py", line 3, in <module> from _core import * File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wxPython/_core.py", line 15, …

Member Avatar for Reverend Jim
0
2K
Member Avatar for c++help

Hi avaughn, welcome to DaniWeb! If you look at the post by cscgal above, you will see all of the elements that you need. The "if number%2 == 0" test is how to tell if a number is even or odd. Then you just have to keep track of which …

Member Avatar for vishakha_3
0
11K
Member Avatar for daviddoria

Is there a library that has a function that will take (theta,phi) and return (x,y,z)? Thanks, Dave

Member Avatar for Ratan_2
0
6K
Member Avatar for KLane

I suggest you hard code some values instead of reading them from a file. You should know exactly what the output should be. Then you can tell and show us what you have given for input, what you expect the output to be, and what the output currently is. Is …

Member Avatar for mellguth
0
1K
Member Avatar for lauruskamj

Once you fill in some of the definitions of those functions, we'll be able to help you. This is just a very very high level outline.

Member Avatar for Daren_2
0
656
Member Avatar for andyherebi

What is the problem? Please try to narrow down the problem to a < 20 line compilable example that we can help you with. Dave

Member Avatar for tinstaafl
0
28K
Member Avatar for rythreion

What have you tried so far? When you come across a specific problem, we'll try to help you out.

Member Avatar for NathanOliver
0
4K
Member Avatar for 35nando
Member Avatar for Abheek88
0
2K
Member Avatar for GuitarComet

With this low level of code it is probably better posed in the C forum than the c++ forum - I'd give it a try there.

Member Avatar for Ömer
0
316
Member Avatar for daviddoria

Does anyone use boost program_options? What I'm trying to do is this: [code] --Files 1.jpg 2.jpg 3.jpg [/code] The only thing I know how to do is [code] --File1 1.jpg --File2 2.jpg --File3 3.jpg [/code] Does anyone know how to do this, and maybe store them in a vector<string>? Thanks, …

Member Avatar for maxgerlach
0
4K
Member Avatar for ziggystarman

So it sounds like you've already narrowed it down to the shared_secret_key function. If you can give us a sample input, the desired output, and the current output to this function maybe someone will be able to spot the problem. That is, I bet you can reduce thes 180 lines …

Member Avatar for logicslab
0
984
Member Avatar for daviddoria

Should I use cmath to use PI and trig functions? I dont think math.h has it - and cmath and math seem like redefine alot of the same things. What is standard practice? Thanks, Dave

Member Avatar for duskoKoscica
0
2K
Member Avatar for daviddoria

I would like to take a screenshot of a region of my screen programmatically (so I can do it every time through a loop, for example.) Does anyone know how to do this? I guess it would involve the win32api - I've not used this before so any hints would …

Member Avatar for dougy83
0
3K
Member Avatar for Etniespr101
Member Avatar for zahrak

I may be mistaken, but here is my understanding... You can't convert "matlab code" to "c++ code". What you can do is write c++ code and then give it a matlab interface and "compile" it with the Matlab MEX compiler. The result is a function that you can call from …

Member Avatar for mohammad110
0
850
Member Avatar for James19142

QLabel::QLabel(const QLabel&) is called the copy constructor, and it is indeed private, so you cannot use it. You are trying to use it by copying your object when you pass it to the function. You should accept a const reference to the object instead: void Test(const QLabel& yourLabel) David

Member Avatar for James19142
0
363
Member Avatar for KellieD

This may be fancier than your instructor would like, but it is the "correct" (modern, c++ style) way to do it. [url]http://programmingexamples.net/index.php?title=CPP/Strings/Case_Conversion[/url] Are you using std::string at all? Or character arrays? David

Member Avatar for Ancient Dragon
0
3K
Member Avatar for daviddoria

For a while now I've been doing this when I want to check the input of a function (in this example, to make sure they are not equal). [code] void foo(int a, int b) { assert(a != b); } [/code] But when the assert fails, I always find my self …

Member Avatar for vibhor48
0
266
Member Avatar for daviddoria

I am trying to make a simple demo of a DataGridView bound to a database table. I want to add a row, delete a row, and save the table. I used the IDE to do just about everything. It created the BindingSource when I set the datasource of the DataGridView …

Member Avatar for tenorjazz
0
143
Member Avatar for badboy11

I'm not too familiar with boost::any, but do you have to any_cast to a boost::any? Or can you just use the object directly? That is [icode] if ( boost::any_cast<boost::any> (contrl->getObject(i)).type() == typeid(Physics::Box2D) ) [/icode] vs [icode] if ( contrl->getObject(i).type() == typeid(Physics::Box2D) ) [/icode] Also, you can see if the cast …

Member Avatar for mrnutty
0
383
Member Avatar for Hand

You may want to ask this question here: [url]http://www.qtforum.org/[/url] or on the #qt channel on freenode.net (IRC)

Member Avatar for MastAvalons
0
190
Member Avatar for cl2020

A fancier way to reverse the string can then be used: [code] std::string reversedString = std::string ( yourString.rbegin(), yourString.rend() ); [/code] You will also want [icode] yourString.compare(otherString)[/icode] Give these revamps a shot and let us know how it turns out. Dave

Member Avatar for youjean
0
332
Member Avatar for daviddoria

Would it be possible to integrate something like codepad.org or ideone.com into Daniweb? It would be really nice to see the compiler output of code snippets automatically. Consider the difference between "Help something is wrong!" [code] #include <iostream> int main() { cout << hi; return 0; } [/code] and "Help …

Member Avatar for JackieBolinsky
0
216
Member Avatar for Labdabeta

I suggest simplying your entire code to about the same length as you have posted. You don't show us any non-virtual classes, and you don't show how AlphaBeta is constructed.

Member Avatar for Labdabeta
0
205
Member Avatar for prabh94

Please change the cin statement to hard coded values 1) so we can exactly reproduce it and 2) so we know which values caused the problem. FPE means you are probably dividing by zero.

Member Avatar for jaskij
0
444
Member Avatar for PrimePackster

You are explicitly asking the user for the dimensions, so what is the problem? You have to assume either row-major or column-major (i.e. for: 1 2 3 4 row major ordering would be (1,2,3,4) where column major would be (1,3,2,4) ), but once you specify how you expect the input …

Member Avatar for PrimePackster
0
256
Member Avatar for dan_code_guru

Please explain what the comment "// dosent work" on the connect call means. Also, you should probably look at some qt examples: [url]http://programmingexamples.net/wiki/Qt[/url] and then ask on qt forums: [url]http://developer.qt.nokia.com/forums/[/url] This Daniweb forum is for pure c++. David

Member Avatar for chikkupa
0
156
Member Avatar for ahoysailor

I suggest you find a more specific forum. I.e. which framework are you using so that you have a text box? C++ does not have text boxes :)

Member Avatar for daviddoria
0
219
Member Avatar for daviddoria

Every once in a while there is a thread with 0 replies that has been marked as "Solved": [url]http://www.daniweb.com/software-development/cpp/threads/398278[/url] When you sort by "Unanswered", I don't think these threads should be displayed (they currently are: [url]http://www.daniweb.com/software-development/cpp/unanswered/list/8[/url]). Going through "unanswered" threads is surely in an attempt to answer some, and you …

Member Avatar for Dani
0
136