- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 13
- Posts with Upvotes
- 9
- Upvoting Members
- 9
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
Hello All, I'm trying to write a simple html editor that will highlight tags, and it does, but if the user types the caret jumps to the very end of the document, how can I stop this from happening? here's my code: [CODE=java] import javax.swing.*; /** * Main frame for … |
|
Re:
I am writing a program that outputs whether or not a number is prime. Can anyone help me find where my syntax error is? Also, i get that i = 3; i <= num; i++ would be true for it being a prime number from the other forums I have … |
|
Re:
Is it possible to pass a map container to the copy algorithm and display it to the std::cout? If so how? What I tried below doesn't work but it looks like it should. Any comments or pointers will be appreciated. [code] #include <iostream> #include <string> #include <map> #include <algorithm> #include … |
|
Re:
Otay, I was brushing up my coding skills by creating a basic, coding 101 list class. At this point it works fine with a generic value, either primitive type or class. If it's a class, all the relational operators need to be overloaded to match the class key. I suddenly … |
|
My name... I'd rather not say. Intrade is fine. I would prefer to be referred as this name than my others anyways. I'm a very shy individual. I have a great need to become not just a good programmer, but a good Computer Scientist. I apologize for my past deeds … |
|
Re:
hi again, i'm just full of problems. i have a vectors of ints and i am trying to find a way to check if there is a repeatting sequence within the vector and what size this sequence is. Does anyone have any suggestions on how i should go about this? … |
|
Re:
I think the following problem is a basic one in numerical codes: Suppose that we would like to do a for loop [CODE] for (double x = 0; x < Y; x += dx) { // numeric code } [/CODE] The problem is that if we set dx=0.1 it is … |
|
Re:
Hi there. I am trying to create a class rectangle. It should have data members length and width of type float (which should default to 1). The class should have member functions that calc. area() and perimeter() and also separate get() and set() functions for length and width. These should … |
|
Re:
Hi, I need to make a simple calculator that just does addition and subtraction. But the program should keep a running total of the calculations entered like this: sum = 0 12 + 3 sum = 15 5-2 sum = 12 1+1 sum = 13 But it also needs to … |
|
Re:
For my class, I am creating a rock paper scissors game. My code is not all the way done, but I am stuck on a certain part of the process. For some reason, I am getting errors on the "==" in: [CODE] while (true) { human = humanChoice(); computer = … |
|
Re:
I am new to this. I am trying to write code to update every other element in an array. Here is all I have.... can't find anything to show me how to do this. [CODE]#include<iostream> using std::cout; using std::endl; int palpha = 0; int main() { char* alphabet[] ={ "A", … |
|
Re:
I just need a little advice. This code I have written works well. The only problem I am having is that the output is not lining up and I don't know what to do. If everything was entered line by line I could get it to line up. Since it … |
|
Hello guys! I'm trying to learn the Boost regex library for a more-convenient means of error-checking and the asio library to allow a fairly portable-means of manipulating data over TCP/IP. My goal is to retrieve the file information from a website (basically http layer). My first problem is determining the … |
|
Re:
I m a computer engg student & m absolutly unable 2 undrstand c++. Cn any1 sggst sme buks or ways 2 stdy C++??????? |
|
Re:
Hey folks, i have a problem with a vector im attempting to program. There are no compile errors but during run time i get an error saying: "Debug Assertion Failed! Program:...filepath\GA.exe File:...include\vector Line: 779 Expression: vector subscript out of range" etc... I have tried stepping throught the program to no … |
|
Re:
So here is my problem. I have been working on a program that impliments a tic tac toe game, but for some reason my array gets messed up after the switch statement in playerX function. If you could take a look that would be great. Heres my program: [CODE]#include<iostream> using … |
|
Re:
hello.. What do we mean by binary search and how we can do it using C++ thanks.. |
|
Re:
How can I define an operatpr [] for this class ? [code] #include <iostream> using namespace std; class Vec4 { float f1,f2,f3,f4; public: Vec4(float ff1, float ff2, float ff3, float ff4): f1(ff1), f2(ff2), f3(ff3), f4(ff4) {} float operator [] (int index) { } Vec4 operator + (const Vec4& v) { … |
|
Re:
hello guys...how can i use iostream.h in VS2008?? im using following code but it is no t working... [CODE] #include <windows.h> #include <iostream.h> HANDLE hEvent; DWORD WINAPI SampleThread(LPVOID iValue) { int iFinish = 120; for(int i=100;i<=iFinish;i++) cout<<i<<endl; SetEvent(hEvent); return 0; } void main() { HANDLE hThread; DWORD dwGenericThread; hThread = … |
|
I'm fairly new to Boost. I would like to use the Regex library. I wanted to follow this guide but it seems that it supports other versions of VC++. [url]http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/install.html[/url] EDIT: I tried finding a link to VC++ 6.0 and I can't find it >_<, apparently Microsoft is no longer … |
|
Re:
I need to write code that can determine if an IP address is in a subnet based one the subnet address and mask. I don't even know where to begin with this, so any tips would be appreciated. Thanks. |
|
Re:
i have been in a java course it´s kinda expensive but anyways i am thinking that im going to quit cause its not hard but its really overwhelming dont you get that feeling?, theres just to much to learn!, i cant believe people learned more than 1 programming language also … |
|
Re:
I have given instructions to write some code and i have to follow the comments giving and i get stuck and some point so can anyone tell me what i did wrong /* * Returns the percent change from the original to the desired servings. * The percent is expressed … |
|
Re:
So, in the course of a simulation of a neural network I have two classes: neurons and synapses (which are basically the coupling between neurons). Synapses mediate information between neurons, so a neuron has to be able to speak to a synapse, and that synapse has to be able to … |
|
What I want to know is if I can call a function defined in a C++ class in Visual Basic through a .dll generated from VC++2010? Is this possible, or do I need to define the .dll with C++ raw functions outside of a class? For example, my class looks … |
|
Re:
is it possible to create a bouncing text using a loop(any loop(for, while, or do while)) in c++..if so, the problem is to create a program that accept a text then the text will bounce on the screen.. i already have an idea on how to start the program.. but … |
|
Re:
so im calculating the avergae of 5 numbers ive put in the array but when i compile i get a very large number heres my code [CODE]#include <iostream> using namespace std; int calcAverage() { int sum=0; int average; int TESTVALS[5] = {2, 18, 1, 27, 16}; for(int i = 1; … |
|
Re:
How can this BST class be better? [code] #include <iostream> #include <iomanip> #include <stdlib.h> #include <time.h> #include <conio.h> using namespace std; template <class KeyType, class ValueType> class BST { public: BST(): mroot(0), mcount(0) {} BST(BST const& tree) { *this = clone(tree.mroot); } BST& operator=(BST const& tree) { if (this != … |
|
Re:
The question is to - Suppose you have a main() with three local arrays, all the same size but type (say float). The first two are already initialized to values. Write a function called addarrays() that accepts the address of three arrays as arguments add them and put their sum … |
|
Re:
Hi, I have been trying to use a struct to hold some const chars that represent a fixed date The idea is to select a date on a Month Calendar and compare it to the fixed date in the struct so that a MessageBox can show [code] typedef struct BASEFULL … |