- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
40 Posted Topics
Re: > why do you think working with a boolean array is any different than working with an array of int's? (which you are already doing). Yeah, because nobody ever learned anything, every programmer in the world just woke up one day and understod everything. Ashenwale: As I understand it, you … | |
Hi, for a school project (exam actually), we've written a ternary trie for text-completion. We fill it with about 400.000 lines of text (13 MB in total, as UTF-8). Now, java represents characters in UTF-16 i believe. So thats 26 MB, + another 26 for saving the complete strings in … | |
I have this annoying problem: I am filling a HashSet out with Road objects, only doing so to avoid duplicate elements. However, the output from lines 81 though 95 shows that the set contains duplicate elements. Sorry for the messy code, this is a pretty ad-hoc sollution, in addition to … | |
When i use this code from another class (I'll post the client if necessary, but in the interest of making a short post:) I get an ArrayStoreException from line 31. As I see it: the array is of runtime-type V, the item that should be added to the array should … | |
Obviously I have some wrong assumptions, because this prints "strsize = 8" no matter what. I realize my use of system() might be misguided, so if you have comments on that don't hold back, just please help out with the string-thing aswell : ) BTW it's a 'wrapper' for shell … | |
I hope I'm posting in the right forum :) I'm primarily concerned with C compilers and sun's JDK, but general info is more than welcome (Documentation for self-education as well). Well, if i wrote a program like [CODE] int i = 5 printf("i is $d", i); [/CODE] Would i=5 be … | |
As part of our exam project we need to write a GUI in java, the problem is that the structure has got us stumped. I'm not asking you to do our work, but if someone could nod us of in the right direction it would really be appreciated. We want … | |
Right, I wasn't sure whether to put this here or in the java forum (since I'm trying this in java) but in the end I figured it is probably a general coding question. Hope I got it right :) So, about object names :) I'm trying to do the c++ … | |
Re: I am absolutely not an expert at this, but I think [URL="https://secure.wikimedia.org/wikipedia/en/wiki/Numerical_error"]this[/URL] might answer your question. (Link was provides to me by SasseMan some time ago) | |
Re: Is that what people use? I'm interested in this as well, but this API seems to have been untouched for 3 years, and I can't even get jmf to work in win7 :/ | |
[B]TL;DR:[/B] I am asking for help considering the structure on the following code, and advice on code structure in general. The problem in this case is the try blocks, which are messing up the scopes and complicating error handling. I will elaborate a little for the more patient readers below … | |
I am following a series of programming challenges for beginners, this challenge requires interactive commandline input which is a pain in java. Therefore I've made a small class in another file to handle the user input. When I try to compile the main class ('external' class compiles without problems) I … | |
This is probably really more of a math problem. I hope I want have to go into too much (for you, boring) detail about the code, as the problem resides in this loops. Please let me know if I provided too little detail :) Now for the problem: I would … | |
The code executes as expected, but I am not sure it is considered good code:) I am thinking especially of the two streams on the socket, if the first one is successfully opened and the next one for some reason throws an exception, the finally block will never run. If … | |
Hi guys :) Well I got an "variable might not have been initialized" error when I tried to compile the following code: [CODE=java]import java.lang.*; public class NewFrame { public static void main(String[] args) { if (args.length != 3) { System.out.println("Usage: java NewFrame <frame-name> <frame-hight> <frame-width>"); System.exit(1); } int firstArg, secondArg; … | |
Hi guys, I have been searching the web a bit without success, perhaps I'm using the wrong keywords. Anywho, I'm looking for a way to monitor how many bytes are uploaded/downloaded from the computer, weather trough the winAPI or whatever, I would really appreciate any help on this :) | |
Hi, i just don't get why this isn't working. It is supposed to read from the end of a .txt and up, until it hits the first space but it just keeps repeating the last character in the text file ip.txt Any help is much appreciated. [code=c++]#include <iostream> #include <fstream> … | |
Hi Guys, I am new to java and I need some help:) First of all: I admit, I did not write this, I re-wrote a bit of it for my needs, and therefore may not be able to fully understand parts of it. The thing is, the script accepts only … | |
Hi, this code is merely for testing a coulpe of functions for use in a bigger program, therefore this code alone may seam silly, but there is a point to it:) When i run this and press "1" the program just terminates, pressing "2" or "whatever here" works fine however? … | |
Re: You are just as subjective as the article you are calling pants | |
Hi guys and girls. I was wondering; is there a way, using winAPI or external libs and whatnot, to check the internet connection etc? more important; check the speed the conmputer is currently uploading at? The goal is to make a program that monitors the internet connection, and if the … | |
Hi, can someone plz tell me how to compile gtkmm in code:blocks? or actually, how to compile gtkmm at all in windows? | |
Re: Do yourself a favour: don't use [icode]system("pause");[/icode] Use [icode]cin.get ();[/icode] | |
Hi, are there some libraries i can use (in MS windows) for stuff like, obtaining info from a website? i read something about sockets once, but im not sure what it is (yes, i googled it :) ) Or would be easier/better, as some suggest, to learn java or python? … | |
Re: I am afraid i cant solve your problem, but i can correct a few mistakes (at least [I]i[/I] think they are mistakes ;) ) Don't put "void" in int main() there is an explanaition [url=http://users.aber.ac.uk/auj/voidmain.shtml]here[/url] (i do not remember who provided this link in an earlier topic, but thank you) … | |
Re: Not sure, but by platform i think he meant linux, windows, mac etc. Am i right John A? | |
Re: Im not sure, but isn't there a fuction like, system time or something like that? | |
Heres the code, im pretty sure i missed something really stupid, No matter what number i type i get "The number oyu type must be a positive number" so i guess the problem is either in my if statements in main or in the checkuserinput function, most likely in my … | |
Re: Why does it need to be before logon? | |
Re: Agni: the lib you are refering to, does it only work in linux or am i mistaken? | |
Hi, which C# enviroment (i like to keep compiler, editer and debugger in the same program) can you guys recommend? | |
Hi, im VERY confused about this, and i get a lot of different explanaitions, so now im asking you guys, because you properly know:) What can .net be used for? what is it good for? .net vs. gtkmm? Can i use the .net framework with c++? and how? Thanks in … | |
Is there a simple way to run another program, say IE, FF or just a simple .bat file sith c++? ive searched around a bit but all ive found is rocket science and didn't seem to be what im looking for. i dont wish to run it "trough" my program, … | |
Re: [QUOTE=VernonDozier;802395]To tell the program to interpret the quotes literally rather than as the end of a string, you must "escape" its special meaning with the escape/backslash symbol: \ [code] #include <iostream> using namespace std; int main () { cout << "Use the escape character \\ to show quotes (\")."; return … | |
Re: you cant go else else, im not sure but shouldn't it be something like [code=c++] if (enhp < 1) //Victory condition. Breaks loop after enemy death { cout<<"The masked man falls to the ground, defeated."; break; } else if (enhp !< 1) { cout<<"You have done "<<random_integer<<" damage." ; } … | |
![]() | |
Hi again, first; i realise this peace of code is stupid, it has been taken out of context, altered for the sake of simplicity etc. I wonder if the problem is the quite large number stored in int to (changed to unsigned long int) i have read on cplusplus.com that … | |
this program is just messing around with file i/o, and then i stumbled across something that i¨ve clearly forgot or missed in the tutorials i've read. my 'guess' is its the to if statements messing up (or perhaps rather their else's) i know i used goto and that means i … | |
I know there is [i]a lot[/i] of threads about books but i didn't find what i was looking for:) so here goes. how is the book ^^ made? does it explain the commands? becaus im a bit fed up with tutorials that just say "write this and write that" when … | |
I know i can use fstream to create, edit and read files in c++, i also believe there is a different way wich i am unfamiliar with. but is it possible to work with files NOT in the same directory as the program? like if the program is in C:\programfiles … |
The End.