63 Archived Topics
Remove Filter This is a remake of the Simple Equation Solver snippet that is written in Java. This is an equivalent version written in C++. | |
Hmm... I've made it my top priority to get a Master's and Ph.D in Computer Science and Software Systems... however I'd like to know what a suitable Master's Thesis would be? I'm thinking about making a book, maybe 6000 pages long, pertaining to nothing but Software ideals and technology. This … | |
This is a simple Search Engine that contains tokenized words as keys, in which they will return values associated with them in an ArrayList. All that is required is a text file from a valid extension. | |
Solves simple string-based expressions. Currently only supports integers, but can easily be expanded to support float-types. | |
Provides a means of performing operations on Rational numbers that can be treated as fractions to make non-whole numbers easier to calculate and read than typical floating point storage types. This was a project for a class. This is by no means an attempt to "reinvent the wheel" (The reason … | |
Hmm this implementation is a bit bulky and unnecessary, but it was required as a project for one of my classes. Programming perspective: You'll notice in the code that I'm still fairly new to manipulating streams directly in C++, but I am trying my best =P. The StandardIncremental overhead could … | |
Simple program that returns a vector of string elements based on the string argument and the token specified. | |
I'm not sure if it has been done yet or not, but I thought this program might be helpful to those that want to practice SQL in Java, because it sure is helpful for me! =) The assumption is that you're running Java 5+ and that you have a Database … | |
Nothing too special, but it was an interesting task. | |
This is a program I designed that implements a little bit of vector-math to determine the collision between 2 vectors. Hopefully this program will be useful to those out there designing 2D graphics programs and need a better solution to determining graphical object-to-object collisions when two objects meet, without having … | |
Hey everyone! =) I'm starting an Application Development club at my college! However, there are a fair amount of programmers with multiple backgrounds who want to be a part of the club and partake in some of the Software we will create. Most of the people who are joining the … | |
In C++, where are the header files that define the standard primitives and bitfields? I would like to confirm something, if it is possible. -Alex | |
I remade an equation-solver program from Java to C++, and I plan to post it soon but I would rather not until I can determine where modulus fits in with PEMDAS. To those who don't know, PEMDAS is the order in which mathematical expressions are to be evaluated. The order … | |
This makes me slightly curious... Why is there assembly code for the string class of C++? [code=asm] page ,132 title strlen - return the length of a null-terminated string ;*** ;strlen.asm - contains strlen() routine ; ; Copyright (c) Microsoft Corporation. All rights reserved. ; ;Purpose: ; strlen returns the … | |
I've recently started studying the Unified Modeling Language. I'm currently using an exam book as a study guide, because it presents features without holding back on information-representation at all. Afterward, I will study the book made by the first 3 who started developing UML (since OOPSLA/OOSE I believe, though I … | |
I tried implementing a template Array-class that allows initial size of global arrays to be known at compile time, specified by the user. When I specify a class of type <1, 1> size, the file compiles fine. However, when I specify a class of any other numeric type, in either … | |
My computer keeps restarting whenever I do something like view a stream-video or also do something else that is video related, i.e. playing Warcraft 3 FT. Sure it can perform fine doing either task (for about 5 minutes) but then the computer just shuts off without warning! Now at first … | |
I had a hard time understanding the concept of memory in a computer, but something my Instructor told me gave me some hope. He mentioned that memory isn't really created upon invocation of "new" in C++, and stated also that memory isn't really removed upon the invocation of "delete." I … | |
I'm making a Servlet application using the a MVC-like implementation, however I'm slightly confused on how I should delegate concurrent modification of the state of the Model object? I intend to use a database to hold information from a given session for a particular individual (the data will be retrieved … | |
I was tinkering around with code in C++ last night trying to make a template algorithm that would be evaluated at compile time and also print information. Unfortunately, because std::cout and std::cin are references to objects and they aren't considered built in types (directly at least), I suppose the compiler … | |
I've always wondered how GObjects had such significantly improved pixel-rendering over objects sketched out by the Graphics object in paint and paintComponent methods. What approach should I take to receive the same effect for big images that are say 1024x960, when using simple Graphics? Is there some way to traverse … | |
Is there any real different between using an union between two types and a reinterpret_cast between two types, for example-- [code=c++] #include <iostream> int main(){ union{ unsigned short *a; float *b; }; float value = 0.6f; b = &value; std::cout << *a << std::endl; unsigned short *s; float *f; f … | |
Hello I'm reading through Scott Meyer's book Effective C++, third Edition. I'm having an issue understanding Page 14, Item 2, paragraph 4. The below is a snippet of code with an explanation quoted from his book-- [code=c++] // Author: Scott Meyers class GamePlayer{ private: static const int NumTurns = 5; … | |
I'm enjoying the book Effective C++. It has highlighted things that I've looked over, never heard of, or never even though of before! However, even with this book my understanding of C++ still doesn't seem to be solid. For some time now I've been curious about how binary data is … | |
I've read up to the point where the author explains partial classes. I understand the general concept - they're used when a class is so big that it is better to split it across files. I created two .cs files. Let's say one is CS1.cs and the other is CS2.cs … | |
Hi, my name is Alex. I'm fairly new to C# but apparently I may be required to know how to manipulate .NET Frameworks via C# so I am studying a beginners book and another book to thoroughly understand the language. The problem is that I am struggling to understand the … | |
I'm having some trouble on deciding to purchase Scott Meyer's Effective/More Effective C++ books or Herb Sutter's Exceptional/More Exceptional C++. I'm assuming both cover the same concepts, but I could be wrong. Opinions/Votes please from C++ programmers that found the one they read useful. There's also an option for both … | |
Is the [X] at the top right corner part of the JApplet or container with the JApplet? I need to make an action happen when the user attempts to close out of the JApplet and I'm not sure of how to properly access the window-closed button within JApplet context. Thanks … | |
I'm having a Focus issue when running a Swing application. There are 4 buttons visible on the JApplet. I have an implementation that allows the user to make keyboard and mouse events in the JApplet. The problem is that I can use the keyboard and mouse events when the program … | |
I recently wrote a cpp file that I'm questioning. I'm unsure of whether the approach I took is correct or if it will cause damage to the heap. The goal of the project is to be able to do "clean-up" on dynamically allocated memory by storing the created object in … | |
I'm trying to create my own pattern (or something similar to a pattern I guess) where objects that are anonymously instantiated can still be referenced, but I'm getting weird memory results. It seems as if the free memory is decreasing when it should be increasing-- [code=java] import java.util.ArrayList; public class … | |
Can someone point me in the appropriate direction to learn the proper use of tagging Information on data with Java Annotations? I've used them before (@Override, @Deprecated and @SuppressWarnings(sp) ) but I'm interested in creating my own for testing-purposes and possibly for medium-to-big projects. I need to understand when to … | |
I've been trying to find time to learn Assembly through the HIDE HLA IDE, but I am completely ignorant when it comes to Assembly. I do not know if my code will be portable when I start learning it. Do other Assembly languages conform to the same standards, or is … | |
I'm having a small design issue with a Checkers game to be done in Java-- I'm not really worried about coding it, I can do that. The problem is listing out the dependencies between classes. For example, what should be responsible for what? IF I code the program with the … | |
How in the hell do you divide by 7 using nothing but-- ~, ^, >>, <<, &, | -- In a set algorithm. I'm stumped. I've tried mapping out different numbers dividing by each other... it didn't work. I would map out a number subtracting from the other to see … | |
I still get here the same way I do every day - through a bookmark I have with this particular link: [url]http://www.daniweb.com/forums/post618391.html#post618391[/url] and I realize how poorly I first wrote less than 2 months ago when I first joined and started C++ I've learned a lot, and am still learning. … | |
Is it possible to send something like, a Frame or Applet to a target computer? If not, how would I set it up so that two users from two different computers could interact with the same JFrame or JApplet? Edit: No I'm not asking for code, just general advice* | |
Forgive me for my lack of Java-lingo. In fact I'd like to find a book someday that will teach me all of the definitions of words that are mentioned for Java classes and objects, as well as processes, etc. If the title isn't at all clear, what I mean is … | |
I'd like an opinion, although it will probably be biased since I'm asking the members of the C++ forum and not the members of Java. I'd also like to apologize in advance if this topic has been done before, but I don't like bumping old topics from years ago. I … | |
I am wondering how one would append additional memory to the end of a pointer that already has memory allocated? For example, if I do something like this... [code=c++] int *intPtr = new int[5]; // pointer can be assigned 5 values of type int // Now I want to add … | |
I'm getting ridiculous results in my program! Seconds work fine Decaseconds (1/10 of a second) work ok Centiseconds seem a bit off Milliseconds are completely off... Here's the code-- [code=java] import javax.swing.*; import java.awt.event.*; public class Clock{ private Timer t; private long startTime = 0, finishTime = 0; private boolean … | |
Is it possible to generate something like the following-- [code=java] public interface Reference{ // Returns a reference of the provided type (in theory) public <E> E getReference(int num); // Set the reference of the type public <E> void setReference(int num, E ref); } [/code] [code=java] public class ClassFullOfReferenceVariables implements Reference{ … | |
I know this is a really sad question to ask, but please tell me... how and when should I ever use extern? I recall an example that Narue showed me but even if I read through the definition from MSDN.com as well as other sources, I still can't quite understand … | |
I'm a complete rookie with NetBeans, and that's unfortunate because this summer our Instructor wants us to use NetBeans throughout the entire course. I'd just like to know... how do I add existing files to a project? I've tried right-clicking the project folders to see if there was some kind … | |
The problem resides below - I'm trying to make a directive command that disable one constructor definition, or the other, based on the parameter of T. When I uncomment the block around the if statement, I get this error-- [ICODE]... missing binary operator before token "(" [/ICODE] --but when I … | |
Does anyone have an website they would recommend to me for learning Regex? I have tried using the Sun's tutorial on Regex as well as the Pattern and Matcher classes that use Regex but I am not quite understanding it. I'd like to use it to return the String values … | |
I found an interesting question on the internet... An interviewer asked a programmer "How would you divide without using division or multiplication?" And the programmer came up with some weird bit shifting operation that did the division. Now, I'd like to make a program that does something similar, since-- int … | |
[code=c++] #include <cstdlib> #include <iostream> /** Test Class for learning template-metaprogramming */ using namespace std; template<int N> //General case for a number class ShowValues { public: static inline void show() { cout << "Start: " << N << endl; ShowValues< (N > 1) ? (N - 1): 1>::show(); cout << … | |
This isn't exactly a thread about a particular question, but a thread that may help people with memory dynamically allocated/deallocated during runtime. The below example goes over pointers in multiple dimensions-- [code=c++] #include <cstdlib> #include <iostream> /** This program can be used to determine whether pointers are deleted or not … | |
Is there a website that has some kind of GUI or application that allows users to enter statements like-- delete delete [] for... n elements... delete arr[n] --etc so that they can learn good memory management? I sifted around some free ebook sites and found one but the link to … |
The End.