Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
57% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
1 Commented Post
~61.3K People Reached
Favorite Tags
c++ x 110
java x 110
image x 10
oop x 6

123 Posted Topics

Member Avatar for Alex_31

You're going to want to open a stream to the file, probably with an [ifstream](http://www.cplusplus.com/reference/fstream/ifstream/), and then read it line-by-line. The `ifstream` has several extraction methods, but it may be easier to use the `getline` function, which reads entire lines at a time ([see here](http://www.cplusplus.com/reference/string/string/getline/)). You will probably have some …

Member Avatar for David W
0
369
Member Avatar for manel1989

Are you using a library that has matrix and vector classes? Are you using arrays? It seems to me, if you're using something pretty simple (such as arrays), moving through each index of the vector and copying the contents of that location in the vector to the matrix would work …

Member Avatar for jackmaverick1
0
253
Member Avatar for jackmaverick1

How do Vim and Emacs allow the whole console to be used, even after an enter has been recieved? (this can be Windows-specific) I've got unbuffered input, and I have methods for output to print to anywhere in the console. What methods do Vim/Emacs employ to make the entire screen …

Member Avatar for mike_2000_17
0
262
Member Avatar for triumphost

It depends on what you need. If you need unicode characters, then use the wide varients of the char type and it's related wide std::string type. The char type will work on Windows and Linux, but if you try to use unicode, it will fail on Windows _and_ Linux.

Member Avatar for vijayan121
0
1K
Member Avatar for jackmaverick1

I've been working on a small API/Library and I realized that I was returning memory that wasn't going to be consistently put on the heap or stack. So my question is this: when I return an object from a function in a Library, should that object be on the heap? …

Member Avatar for mike_2000_17
0
245
Member Avatar for jackmaverick1

When connecting to a database, is it best to use one SqlConnection object for the entire server, or use one for each connection? I couldn't find a good answer in Google, but maybe my Google-fu isn't good enough.

Member Avatar for deceptikon
0
82
Member Avatar for angel.heaven.58367

Have you made an attempt yet? If not, then please do before posting. Also, your question is very hard to understand. I can't tell just what you want from what you've posted, so I don't feel particularly inclined to help you.

Member Avatar for sarathy333
0
91
Member Avatar for anestistsoukalis

Because while(TRUE) will give you an infinite loop. See [here](http://www.cprogramming.com/tutorial/c/lesson3.html) for more details.

Member Avatar for tinstaafl
0
223
Member Avatar for RaJsHaH.23

Lines 27 to 31 have a problem involving the if and else clauses. I'll leave it to you to find out just what is wrong, becuase this seems to be an assignment. This isn't the only problem I found, just one of the most glaring. Also, in the future, please …

Member Avatar for corby
0
243
Member Avatar for kanbear11

The basic idea when you're doing anything of this nature is to (assuming you're not going to use a more advanced algorithm) is to take a given item (name, in this case) and compare it with all the other options. The most basic way to do this is to have …

Member Avatar for kanbear11
0
1K
Member Avatar for B204

When you initialize an array via the = new <TYPE>[]; method, the array is created, but the objects are not. This means that when you try to run methods on them, like in line 16, they will throw a NullPointerException. If you initialize them (in a loop or otherwise), the …

Member Avatar for stultuske
0
204
Member Avatar for jackmaverick1

During the process of creating my latest game, I've come across the problem of collisions. In the last few games I've made, I've used a system of collision detection that relyed on two rectangle's methods. This seems to work, but doesn't provide a method for dissallowing an entity entry into …

Member Avatar for jackmaverick1
0
214
Member Avatar for stephanieirene
Member Avatar for NetJunkie

I started when I was 9, and was learning a game's script engine language (I think it was called Action Script), then, a couple of months later, I bought a book on C++, and learned the book's contents in a couple of days (Up to classes, and yes, I mean …

Member Avatar for Reverend Jim
0
965
Member Avatar for m1n1m3

Well, Java is pretty much completly cross-platform, and the USB should be able to install its own drivers... It does is for me... (like when I plug in a new drive). As for no install file, you can just create a .jar file and lauch it within an autorun file.

Member Avatar for jackmaverick1
0
298
Member Avatar for jackmaverick1

I've got a game, and I'm trying to do it right. I've got a spritesheet (which is really just a class that loads images for easy access. It seems to work, but then my tile system starts, and it fails in an interesting way - it loads only the foreground, …

Member Avatar for jackmaverick1
0
197
Member Avatar for Muni123

You need to put the code in for the " Code blocks are created by indenting at least 4 spaces ... and can span multiple lines"

Member Avatar for Muni123
0
196
Member Avatar for sssabita

Do you need to take the tweets and decipher their meaning? If so, go become a masters degree in Artificial Intelligence. (Not to be discouraging, but that is truly very, very difficult to do.) If not, use a loop and a switch ([CODE] for(int i=0;i</*Value*/;i++) { switch(testValue) { case testThing: …

Member Avatar for siva111
0
176
Member Avatar for paoi00
Member Avatar for johans22

Memory allocated with `new` can be de-allocated with `delete` [Wikipedia Article](http://en.wikipedia.org/wiki/Delete_%28C%2B%2B%29) One thing to note is that array allocated with `new[]` must be deallocated with `delete[]` int integer = new int; int* pointer = &integer; delete pointer;

Member Avatar for jackmaverick1
0
158
Member Avatar for rezonk

Is there something wrong? I see a few things, but they should become apparent after you try to compile it.

Member Avatar for nullptr
0
165
Member Avatar for jackmaverick1

I have a project going (the idea for which I got from a website a couple of years ago) and its been going pretty well. However, I have come upon a strange error, which I can't find the source of (well, I know the source but I don't know what …

Member Avatar for histrungalot
0
394
Member Avatar for bsabowala

Always, always, always use `equals()` for comparison between the texts of Strings. == is only used for checking if a String is null or not. String s1 = "Hello!"; String s2 = "Hi!"; //s1 might '==' s2, but !s1.equals(s2). Hope that makes sense!

Member Avatar for JamesCherrill
0
189
Member Avatar for mariel_1013

Start by trying yourself, then posting any problems on the forum. We can try help from there.

Member Avatar for mariel_1013
0
313
Member Avatar for jackmaverick1

I've decided to try to create a small (very) game in Javascript + HTML, using the Canvas element. So far, its gone pretty well, but recently I started on bullets. This also has gone well. I've decided to try to implement a bullet-goto-mouse type thing. I know this uses trigonometry, …

Member Avatar for jackmaverick1
0
156
Member Avatar for jackmaverick1

I've got a wall in my 2-D game. I've got everything except the not-allowing-you-into the wall part. I know I can use the intersect method on some Rectangles to know if they intersect, but I need to know where they intersect so that I can kick them out when they …

Member Avatar for NormR1
0
119
Member Avatar for DMBoston

By "run" do you mean re-start the program, or loop through the program multiple times?

Member Avatar for DMBoston
0
163
Member Avatar for jackmaverick1

[CODE] #include <vector> #include "Rab.h" class Envo { vector<Rab> items; };[/CODE] the error is: [ICODE]error: 'vector' does not name a type[/ICODE] I can't find ANYTHING that's wrong. Is someone else able to find it? BTW, Rab.h contains the class 'Rab'. Jack

Member Avatar for jackmaverick1
0
86
Member Avatar for rfrapp

If I'm not mistaken there's a function in one of the stream library's that allowes you to change the type (if that's the correct word) of number. This might require creating a stream, which may or may not be what you want to do. Hope this helps, Jack

Member Avatar for rfrapp
0
3K
Member Avatar for jackmaverick1

I've got a little inventory management system going, and it searches for products by name. It also loads old data from a file on the hard disk. For whatever reason, when it loads the name, it doesn't accept the name that it displays in the save/buy functions. If that doesn't …

Member Avatar for jackmaverick1
0
148
Member Avatar for Siberian

I switched A few weeks ago and I love it! I had to find a few ways to do some things but almost my entire array of tasks I had no problem setting up. The only hard one was printing, I had to find the URI and manually set it …

Member Avatar for NeilSiri
0
209
Member Avatar for jackmaverick1

I've made a little game (not really, just a bit of a start), but the collision detection is a little screwy. It works within 2 pixels for the bottom three sides. However, on the top, there is a buffer of about 20 pixels that it counts as part of the …

0
77
Member Avatar for Labdabeta
Member Avatar for jackmaverick1

When I try to put the JTextArea in a JScrollPane, it a) doesn't display the menu most of the time, and b) doesn't display the scroll bars, even though I've got more text than the size of the JTextArea. Code (it's a VERY simple error console for something else): [CODE]import …

Member Avatar for NormR1
0
162
Member Avatar for jackmaverick1

So. I've written my first little graphics game (using the Graphics API) and would like to know two things: a) What's wrong with my collision detection? (Could you point me in the right direction?) b) What am I doing that is not the best way. Is there a better way …

Member Avatar for JamesCherrill
0
123
Member Avatar for jackmaverick1

The error I'm getting makes NO sense seeing as I'm defining the functions it's confused about directly above. The error: undefined reference to `accMan()' undefined reference to `bookMan()' undefined reference to `lend()' undefined reference to `getBack()' undefined reference to `tellMenu()' undefined reference to `tellMenuAcc()' undefined reference to `tellAllBooks()' undefined reference …

Member Avatar for jackmaverick1
0
144
Member Avatar for jackmaverick1

Hi! I heard of a thing called Hotswap debugging, but I haven't figured out how to use it. I can't find a download anywhere, nor can I find a thing called hotswap debugging in the debug menu (I use Eclipse). Just wondering, Jack

Member Avatar for Ezzaral
0
112
Member Avatar for cgray1989

It seems that you have one score, and you keep inputting to it. I would suggest that you make a list of somekind, and input them into that. The names can be done the same way. Then loop through, adding each students score to an int. when you're done, divide …

Member Avatar for jackmaverick1
0
131
Member Avatar for ConfusedLearner

I would decide how you are going to handle cases (F is, or not, equal to f) and start looping through the sentence array. While you are looping, take note of each time the given char appears. Each time you encounter a new line, take note of that (or just …

Member Avatar for bboy_fresh
0
273
Member Avatar for oldezwe

You should create a boolean and set it true when you open a webpage. Then, when you try to open it again, test to see if it is true. If it is, don't open the page. If not, go ahead and run the code.

Member Avatar for peter_budo
0
484
Member Avatar for rayden150

I THINK that is a problem with the character encoding. I don't know how to fix it, but I thought that that might be a future Google search. Sorry about my un-helpfulness. -Jack

Member Avatar for hfx642
0
222
Member Avatar for jackmaverick1

Before you read this, please don't say how I could make this better, I've thought of it, or because of the circumstances, it's not possible. I'm having a problem where when I input a command into the Runtime class's exec function, it doesn't run. When I try the exact same …

Member Avatar for NormR1
0
295
Member Avatar for asif49

You should use a list or vector instead of arrays. This would prevent people inputting more than 1000 employees or jobs. I think that you should not have the JobOnSystem/EmployeeOnSystem class (in my opinon), instead I think you should make the two arrays Lists and start by making the needed …

Member Avatar for JamesCherrill
0
301
Member Avatar for jackmaverick1

Sorry, but I REALLY don't understand what could possibly be wrong with my code (or maybe it's not my code?). When I run the writeChar(char*,char) function, my program crashes. I really don't have any idea why, as my pointers (I think, I've checked, but I'm not very good at that) …

Member Avatar for Schol-R-LEA
0
351
Member Avatar for begprogram

Well. You should start by looping around to ask for inputs. This might look like this: [CODE]String lastInput; while(lastInput.equals(/*Some string that means to stop asking for input*/) { System.out.println("Enter a first name. Enter '0' for stop."); lastInput = input.getLine(); if(lastInput.equals(/*Some string that means to stop asking for input*/) break; } …

Member Avatar for stultuske
0
110
Member Avatar for jackmaverick1

My problem is that when I try to gather the parts of an array, the part of my code that decides what to keep seems to be making a mistake, though I can't fathom how it is making that mistake. My code is posted below. You should see the parts …

Member Avatar for NormR1
0
322
Member Avatar for jackmaverick1

I need to take the end off of a file. What I mean is that I have a file, and it has an end marker, but I can't write past the end marker. Is there a way to do this?

Member Avatar for jackmaverick1
0
114
Member Avatar for phorce
Member Avatar for PixelExchange

I don't know the Win32 API, but I would recommend Googling, and searching Microsoft's documentation ([URL="http://msdn.com"]http://msdn.com[/URL], I think). It works for me almost every time!

Member Avatar for jackmaverick1
0
111
Member Avatar for jackmaverick1

I get this error, [CODE]Exception in thread "main" java.io.IOException: Cannot run program "java -jar C:\Users\Jack\testFile.jar\" (in directory "\"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at testProject.Main.main(Main.java:15) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) …

Member Avatar for hiddepolen
0
246

The End.