Posts
 
Reputation
Joined
Last Seen
Ranked #422
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
3
Posts with Upvotes
2
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
~14.5K People Reached
Favorite Forums
Favorite Tags
c++ x 32
java x 3
c x 1
Member Avatar for peter_budo

I have four JTextFields where user is allowed to enter only numbers. Question is how do I do this?

Member Avatar for JamesCherrill
0
9K
Member Avatar for scarypajamas

I've have a class function below (using fstream) for my game that I had working on Visual C++ 2008. When I tried to port my app to xcode, I found it compiled, but complained that the directory doesn’t exist. Believe me, the directory exists. I've checked and rechecked! Basically this …

Member Avatar for iamthwee
0
990
Member Avatar for Nemoticchigga

Has anyone ever seen a function call just get skipped? I am running in debug mode and it wont let me set a break point on the call and when i step to it it goes right over to the next line, no exceptions, no errors. Has anyone EVER seen …

Member Avatar for Nemoticchigga
0
256
Member Avatar for hiddendragon

how would u diplsay the lowest or highest value of an array that the user entered so u ask the user to enter several number and it goes into an array then how would u display the highest/lowest value in that array to the sreen

Member Avatar for titaniumdecoy
0
2K
Member Avatar for fmwyso

Hey, I decided I should probably read a book to learn about C++ considering there are so many and etc :P. My parents said they would buy it for me, but I just wanna make sure it is gunna actually be a book that will teach me alot and hopefully …

Member Avatar for Dave Sinkula
0
131
Member Avatar for kadajett

[CODE]#include <iostream> #include <fstream.h> #include <string> #include <vector> void input(int, std::string); void output(); using std::vector; using std::ofstream; int main() { std::string filename = "file.txt"; int number; vector<int> tileList(); std::cin >> number; tileList().push_back(number); input(tileList(), filename); output(); return 0; } void input(vector<int> tileList, std::string filename) { //vector<int> tileList; this needs to be …

Member Avatar for iamthwee
0
98
Member Avatar for sohel08

I think I might be having trouble understanding variable initialization again, but thanks for the help. Also, if there is an operator for raising to powers, not scientific notation, I would appreciate hearing about it since I can't seem to find it in the index

Member Avatar for titaniumdecoy
0
66
Member Avatar for SunshineLuvr

I am writing a payroll program with inheritance for a school assignment that has the following requirments: [B]Expand the Employee Payroll program to include hourly based and salary based employees. This phase uses an array of employee objects, inheritance for different classes of employees, and polymorphism for salary computation. The …

Member Avatar for mitrmkar
1
577
Member Avatar for titaniumdecoy

Is there a difference, in terms of performance, between the two loops below? (myvec is type [icode]std::vector<int>[/icode].) [CODE]std::vector<int>::const_iterator pos; for (int i = 0; i < N; i++) { pos = myvec.begin(); // do something with pos }[/CODE] [CODE]for (int i = 0; i < N; i++) { std::vector<int>::const_iterator pos …

Member Avatar for Narue
0
142
Member Avatar for titaniumdecoy

I did some searching on this topic but couldn't find anything definitive. Are basic types automatically initialized to 0 in C++ when allocated via [icode]new[/icode]? For example, are all values of nums guaranteed to be 0 in the code below? [icode]int *nums = new int[10];[/icode]

Member Avatar for Narue
0
102
Member Avatar for CoolGamer48

When using >> to extract data from an istream, are spaces skipped over? I.e., if I extracted every character from: "Hello, my name is not World.", would the 5 spaces not be read by >>? If so, is this behavior omitted from istream::get()? Thanks.

Member Avatar for titaniumdecoy
0
103
Member Avatar for arun0107

[code=c] typedef struct _node{ char *name; char *desc; struct _node *next; }node; #define HASHSIZE 101 static node* hashtab[HASHSIZE]; char* m_strdup(char *o){ // the m_strdup function....... int l=strlen(o)+1; char *ns=(char*)malloc(l*sizeof(char)); strcpy(ns,o); if(ns==NULL) return NULL; else return ns; } int install(char* name,char* desc){ unsigned int hi; node* np; if((np=lookup(name))==NULL){ hi=hash(name); np=(node*)malloc(sizeof(node)); if(np==NULL) …

Member Avatar for Prabakar
0
157
Member Avatar for titaniumdecoy

The default copy constructor should work for the Polynomial class below because it does not contain any dynamic data types. However, when I create a new Polynomial via the copy constructor, it prints 0 for the value of each coefficient. How can I fix this? [CODE]#include <iostream> #include <vector> class …

Member Avatar for Duoas
0
136
Member Avatar for sarehu

What do you think of this? [url]http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml[/url]

Member Avatar for Nick Evan
1
145
Member Avatar for lil_panda

How would I go about deleting all '' characters from a string? [B]I am using the command line to pass parameters with parenthesis, so anyone who uses my program will need to use '\(', '\), '\[', '\]', etc.[/B]

Member Avatar for titaniumdecoy
0
100
Member Avatar for gregorynoob

a mouse is trapped in a labyrinth.. and he has to find the cheese! the input is W and H (height and width), and a graph like this one: [CODE] ##...# C###.. ...... .####. .....M [/CODE] i'm supposed to calculate the shortest amount of steps he needs to make to …

Member Avatar for gregorynoob
0
173
Member Avatar for titaniumdecoy

I have a template function as follows: template <typename T> int my_func(T& arg) T is expected to be of type map<T1, T2>. T1 is expected to be of a basic type (int, long, etc.) and T2 is expected to be of type vector<T1>/list<T1>/etc. I want to iterate over the contents …

Member Avatar for vijayan121
0
110
Member Avatar for titaniumdecoy

If I declare a struct node, is the following legal in C++? [icode]node nodes_array[vector.size()];[/icode] I know this is not legal in C. However, my C++ compiler does not complain. Is this only in recent versions of C++, or has this always been legal in C++?

Member Avatar for sarehu
0
96
Member Avatar for titaniumdecoy

I am writing a chess game to familiarize myself with the C++ language. I have a Board class which contains a 2D array of pointers to Piece objects. I want to implement Board::operator[] such that the following is possible: [CODE]Board b; Piece *p = b[0][0];[/CODE] I could just return a …

Member Avatar for titaniumdecoy
1
117
Member Avatar for wavyaquaeyes

Hi All, I have been working on this all night. I have to convert degrees to celcius and vice versa. I keep having 2 errors. "possible loss of precision". I am new to java, but also I think I am having serious mental issues at this point. Here is my …

Member Avatar for wavyaquaeyes
0
145
Member Avatar for Dallos

Hi im trying to write a program that sorts an array in alphabetical order and then into phone book order, Eg input: Jane Pascal 364756 Bob Smith 364758 Joe Bloggs 253647 The output should be: Bloggs, Joe 253647 Pascal, Jane 364756 Smith, Bob 364758 The plan is to have each …

Member Avatar for titaniumdecoy
0
68