- Strength to Increase Rep
- +14
- Strength to Decrease Rep
- -3
- Upvotes Received
- 157
- Posts with Upvotes
- 134
- Upvoting Members
- 88
- Downvotes Received
- 25
- Posts with Downvotes
- 23
- Downvoting Members
- 13
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
Re: Sorry, we will not just do your assignment for you. We also cannot teach you all of c++ - you're going to have to give it an attempt and we can help when you run into problems. | |
Re: 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 … | |
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, … | |
Re: 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 … | |
Is there a library that has a function that will take (theta,phi) and return (x,y,z)? Thanks, Dave | |
Re: 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 … | |
Re: 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. | |
Re: What is the problem? Please try to narrow down the problem to a < 20 line compilable example that we can help you with. Dave | |
Re: What have you tried so far? When you come across a specific problem, we'll try to help you out. | |
Re: You can try VIL (part of VXL) [url]http://public.kitware.com/vxl/doc/development/[/url] | |
Re: 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. | |
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, … | |
Re: 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 … | |
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 | |
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 … | |
Re: 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 … | |
Re: 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 | |
Re: 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 | |
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 … | |
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 … | |
Re: 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 … | |
Re: You may want to ask this question here: [url]http://www.qtforum.org/[/url] or on the #qt channel on freenode.net (IRC) | |
Re: 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 | |
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 … | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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 | |
Re: 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 :) |