5,331 Posted Topics

Member Avatar for Mafiasays

Ok. That would be helpful. Writing operators can sometimes be confusing for the new C++ developer. The signature is critical. If you are using a non-const signature and are (probably) applying it to a const object, reference, or pointer, then you will have a problem. Likewise, the arguments passed and …

Member Avatar for Mafiasays
0
386
Member Avatar for daryll1
Member Avatar for daryll1
0
167
Member Avatar for aamira_s

Using [icode](int)sqrt(n);[/icode] as a divisor (for your modulus operation) is not a good idea, since it will cast away the fractional part, resulting in an invalid result. There are other issues as well, but this is a start. Myself, I do some short-cuts (anything ending in even number -> reject, …

Member Avatar for Adak
0
165
Member Avatar for ThatGuy2244

A couple of (or a few) questions: 1. What video hardware (video board) are you using? 2. What kind of display? 3. How are you trying to program the display? Modern cards are 24-bit or 32-bit color capable. There is a standard api interface that most all modern cards support …

Member Avatar for ThatGuy2244
0
316
Member Avatar for jowana

The problem isn't with OpenGL - it is just an interface to display stuff on the screen. Calculating the vector is the main problem. That is simple calculus or vector algebra. Refresh your math and go from there!

Member Avatar for jowana
0
119
Member Avatar for mushahidh
Member Avatar for geekme

There are at least 2 you can get. One is for the Cygwin Unix/Linux environment and requires the Cygwin runtime support. The other is MinGW. Below are their web sites where you can freely download them and get appropriate documentation. Cygwin: [url]www.cygwin.com[/url] MinGW: [url]www.mingw.org[/url] They both work well. I used …

Member Avatar for mike_2000_17
0
163
Member Avatar for toto_7

You expect people in their spare time to analyze this much MIPS assembler code? Wishful thinking, I do believe... :-) Try to be more direct as to where you are experiencing a problem. In any case, since you are experiencing a word alignment error/exception, look at where you are placing …

Member Avatar for rubberman
0
173
Member Avatar for jzng89

Aren't you commenting out initialization of the DS register? As far as I remember (from my last x86 assembler coding work around 1990), if you don't initialize DS, then it is set to CS. Sorry that my memory is so spotty about this. I was just looking at my old …

Member Avatar for rubberman
0
228
Member Avatar for Runicode

Somewhere on my bookshelf, gathering dust, is an original Intel x86 manual. Back then, they didn't have the 32-bit and 64-bit instructions. 16-bit only... :-) Anyway, it was compliments of my college buddy, Bruce Ravenel, who was one of the principal architects of the x86 processor at Intel back in …

Member Avatar for rubberman
0
136
Member Avatar for matrixcool

ASCII digits can simply be converted to integer binary numbers by subtracting the character '0' from them.

Member Avatar for rubberman
0
3K
Member Avatar for thunderbird24

This appears to be, at first blush, a simple xor substitution/rotation algorithm. Simple stuff. You solve it... If this is from commercial software, I have to think there is more to it than this, unless they are trying for "security by obscurity" - the key is in the "key". If …

Member Avatar for rubberman
0
265
Member Avatar for arthurav

Showing the output of your code isn't particularly helpful. Please state the algorithms you are using, in detail (functionally). You mention stuff like "revised simplex method with LU decomposition", but you don't show specifically how your are applying these abstractions. Show the math...

Member Avatar for rubberman
0
92
Member Avatar for markfw

What venomxxl said. Adding to that, in the days before C++ (some of use were doing complex C software development in those dark years), we still understood abstractions, and keeping the association of processing functions close to the data they were intended to process - sort of the antecedent of …

Member Avatar for rubberman
0
86
Member Avatar for ali jiger

School problems/exercises don't get simple answers - you have to make an effort to solve the problem first yourself before we will chime in with corrections, hints, etc. Please read the terms of use for the forums. It explains this clearly.

Member Avatar for rubberman
0
60
Member Avatar for shauzi158
Member Avatar for rubberman
0
86
Member Avatar for TailsTheFox

Normally you would put the input device (stdin for C or cin for C++), and preferably use the POSIX termios functions to set the device into raw (unbuffered, unmapped) mode. That would normally be the tcsetattr() function. On Windows, if you don't have the POSIX libraries and headers installed, there …

Member Avatar for rubberman
0
105
Member Avatar for jimJohnson

DO NOT ASSIGN VALUES to the vector argv[] (lines 27, 77, etc). Those are set by the system when the program runs. You have probably munged program memory as a result.

Member Avatar for abhimanipal
0
173
Member Avatar for presley tonde

Here is a link to a page with a list of OpenSuse mirror sites. One may work better for you. [url]http://mirrors.opensuse.org/list/all.html[/url]

Member Avatar for presley tonde
0
79
Member Avatar for MarginOfBuffett
Member Avatar for MrHardRock
Member Avatar for jon.kiparsky
0
168
Member Avatar for swmartinez

I think your surmise about a short circuit is likely correct. Check the cabling and connectors first, but it may well be that either the backlight is bad, or the display itself is fubar. My guess would be the backlight, but that is just a SWAG.

Member Avatar for swmartinez
0
168
Member Avatar for addbot101

You analyze it and tell us... No help on school work from us until you have made a reasonable effort to solve the problem yourself. Also, please post code inside of code blocks. See the "[CODE]" button at the top of the message editor.

Member Avatar for rubberman
0
126
Member Avatar for san man

Sorry, but we aren't going to do your homework for you. Please make an effort to solve this problem first, even if it is only a text description of what you think you should do. There are a lot of texts on this subject, and plenty of those to be …

Member Avatar for rubberman
0
2K
Member Avatar for advxc153

That probably means that there are no available partitions left. The standard partition table only has room for 4 primary partitions. Windows and the recovery partition take two of those. Please boot into the LiveUSB device, log into the GUI as root, start up a terminal/console window, and execute this …

Member Avatar for Stefano Mtangoo
0
148
Member Avatar for devesh2222

The Linux kernel is written in C, and mostly does even handling (hardware and software interrupts, I/O events, CPU traps, etc). What precisely do [B][I]you[/I][/B] mean by "event handling"?

Member Avatar for yashsaxena
0
77
Member Avatar for geekme

You have a long way to go... There a a number of graphical tools and API's available, many of which can run on most operating systems (Windows, Linux, Unix, Apple, etc). OpenGL is quite low-level and requires a great deal of detailed knowledge of the windowing environment (different on each …

Member Avatar for mike_2000_17
0
133
Member Avatar for zach&kody
Member Avatar for slygoth

Read up on the file seeking functions. You can position your current read/write position at a specific place in a file, either offset from the beginning, end, or your current location (backward or forward) in the file. From the Linux fseek() man pages: [code] FSEEK(3) Linux Programmer’s Manual FSEEK(3) NAME …

Member Avatar for rubberman
0
175
Member Avatar for Chris11246

What dviddoria said, but also the GPU stuff requires 1) an nvidia card w/ CUDA capabilities, and 2) the nvidia CUDA development tools and libraries. This second issue is what may be causing your link failure. Anyway, here is the OpenCV GPU FAQ page which talks about what you need …

Member Avatar for rubberman
0
283
Member Avatar for fadi_1234

You still are not being very clear in what you are trying to do, so let me put on my pointy, star-covered wizard hat and see if I can read your mind... You have been able to output random times and/or values to a string, but you want to do …

Member Avatar for rubberman
0
106
Member Avatar for mayank.dyl

You can boot a Linux rescue CD/DVD and see if the drive is accessible or not. If not, then either the drive or the controller are fubar. If it is visible with the "fdisk -l" command, then it may be than something has munged the boot loader. There are several …

Member Avatar for rubberman
0
629
Member Avatar for prity

Some people here have actually earned their knowledge, positions, and degrees the hard way, by doing the work. I'm happy to see that you are not so inclined. After all that takes time and effort!

Member Avatar for rubberman
0
77
Member Avatar for kao

So, what does this code have to do with class diagrams (the subject of the post)?

Member Avatar for rubberman
0
77
Member Avatar for madtowneast

Post the contents of your .cvsrc file here. From the Linux CVS man page: [code] -f Do not read the ~/.cvsrc file. This option is most often used because of the non-orthogonality of the cvs option set. For example, the cvs log option -N (turn off display of tag names) …

Member Avatar for rubberman
0
92
Member Avatar for pennylynne

I used to teach relational algebra and calculus, but this was before Tutorial D came along (mid 1980's). What system are you using, D4?

Member Avatar for rubberman
0
106
Member Avatar for abhisharma1987

You make an effort to solve your class problems, and then we will consider helping you through some of the rough spots. Don't expect us to do your work for you. It isn't fair to you (you learn nothing), and it isn't fair to the others in the class who …

Member Avatar for rubberman
0
51
Member Avatar for dspjm

What version of RHEL are you running? 4, 5, 6? In any case, the process is this. 1. Login as root 2. cd to /etc/yum.repos.d 3. Remove red hat specific .repo files. 4. Copy CentOS or Scientific Linux repo files to /etc/yum.repos.d 5. You should be done, except to install/update …

Member Avatar for rubberman
0
152
Member Avatar for wolfrain63

Also, coding first then writing the specs and other documentation is bass-ackward! Gather requirements, write specifications (use-cases), design the system (class model, relationship diagrams, pseudo-code, scenarios, state machines, etc), write user document, develop test plan, write code, execute test plan, update documentation for changes made while coding/testing, and track the …

Member Avatar for rubberman
0
97
Member Avatar for Straocaste

Consider this an exercise in parsing, more than anything else. Also, write out the process to use with pseudo code before you start to write any C code. So, here is a brief p-code version of what a shell does [code] const char* progname = 0; while not done read …

Member Avatar for rubberman
0
177
Member Avatar for menonnik

Monte Carlo methods are used for complex simulations. It is widely used in particle physics for designing experiments. Here is a link to a web site at Oak Ridge National Lab on numeric algorithms and monte carlo methods that may be of help: [url]http://www.phy.ornl.gov/csep/CSEP/BMAP.html[/url]

Member Avatar for rubberman
0
103
Member Avatar for caltech

The implementation of printStock() and Sales() differ from their declaration at the top of the file. The declaration for printStock() is [icode]void printStock(int, int)[/icode] whereas the implementation is [icode]void printStock(int[], int)[/icode]. Ditto for Sales().

Member Avatar for caltech
0
131
Member Avatar for PaulBird

What OS and compiler are you using? And what command(s) did you use to build your code? Finally, please post the error output you got, as well as the code if possible.

Member Avatar for rubberman
0
306
Member Avatar for Buffalo101

There are a number of functions in the atoi() family, some of which can be used for floating point values. These functions are strtof(), strtod(), and strtold(). Don't use atoi() or atof() functions - it is better to use strtol() and strtof() type functions instead as they give you better …

Member Avatar for rubberman
0
123
Member Avatar for lochnessmonster

Classes are to be preferred if you may want to subtype them and their behavior. Example for your logging functionality. You might a logging class to log to a file, rotating the files when they get to a certain size, and another one to send log messages to a remote …

Member Avatar for mike_2000_17
0
116
Member Avatar for eskimo456

Are you talking about running an OS in a virtual machine? If so, then read this first: [url]http://en.wikipedia.org/wiki/Virtual_machine[/url]

Member Avatar for rubberman
0
158
Member Avatar for timo86m

Actually, your constructor is very badly written - I give it an 'F'. More properly it should be like this: [code] myclass::myclass(const myclass &obj) : p(new int) { *p = *(obj.p); // copy value cout << "Copy constructor called.\n"; } [/code] Note the instantiation of the pointer member in the …

Member Avatar for rubberman
0
168
Member Avatar for advxc153

Do you mean Ubuntu 10.10? Also, are you running the 64-bit, or 32-bit version? Post output of the command [B][I]uname -a[/I][/B] here.

Member Avatar for rubberman
0
73
Member Avatar for Dean_Grobler

Have you done a thorough virus/malware/trojan scan of your system? It could be hardware (something as simple as a loose/bad cable), or it may be something more serious. If it is the drive, they aren't very expensive to replace ($30USD about). If you have been pwnd, then you may have …

Member Avatar for rubberman
0
139
Member Avatar for psychoflyer

UDP - more efficient TCP - more reliable A number of applications use UDP because of its efficiency, such as (optionally) NFS. Example, One end sends sends 100 packets, each associated with one block of a file. It will sequence them, and include a checksum. These are validated by the …

Member Avatar for rubberman
0
186

The End.