No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Aspiring Indie Game Developer
- PC Specs
- Lenovo Ideapad Y500
According to JLS, the [grammer](http://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.14.1) of basic for statement is for ( [ForInit] ; [Expression] ; [ForUpdate] ) Statement It's also said on the JLS that 'The Expression must have type boolean or Boolean , or a compile-time error occurs.' So to check if the syntax is valid, the parser … |
|
I am honestly stumped. I need to Create a BankAccount class that has the following: a) Instance variables for: name, accountNumber, balance, typeOfAccount b) Accessor/mutator method for each instance variable (You will end up having 8 methods) c) Create a displayAccountInfo() method that displays the account information as follows: Account … |
|
I have two classes that I am compiling from command line. One is Vehicle class, class Vehicle{ int passangers; int fuelcap; int mpg; } and another is VehicleDemo class. This class instantiate an object of Vehicle class. class VehicleDemo{ public static void main(String args[]){ Vehicle minivan = new Vehicle(); int … |
|
I want my program to throw exception on console window. But when exception occures Microsoft Visual C++ Runtime library dialog box shows up. What can I do to stop visual studio from stopping execution of my program when an exception occues and let my program handle the exception? I am … |
|
Hi, I used to solve ACM problems, but I used old scanf & printf for input and output.But now i want to use C++ style IO. So, i picked a simple problem, and tried to convert its old style IO to new style IO. The problem : [URL="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=996"]http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=996[/URL] (in summery, … |
|
How to start a servlet automatically when index.jsp starts. To put it simple, here is the index.jsp file. [CODE]<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>JSP Test</title> </head> <body> I want to put something here, so a servlet automatically starts without doing anything. </body> </html> [/CODE] |
|
What is the most efficient way to take input of a character array or string of 25 ASCII characters using scanf? They are not formatted, just a sequence of character. i.e. ABCDEFGHIJKLMNOPQRSTUVWXY One more point is that, after input I have to find a sequence of character within this string, … |
|
I am trying to print my stack trace on a file. So far I am successful. But, when I try to create the log file name using current time and date, the main program throws exception in the Output(NetBeans) window instead allowing my code to handle it. I am using … |
|
What does the $ means, EventQueue$1.class(Red marked) Attached picture [URL="http://i39.photobucket.com/albums/e179/iamcreasy/Untitled-6.jpg"]http://i39.photobucket.com/albums/e179/iamcreasy/Untitled-6.jpg[/URL] I am using NetBeans. |
|
This simple code is showing the following error. [CODE]import java.io.IOException; import java.net.*; public class Server { public static void main(String[] args) throws IOException { DatagramSocket ds = new DatagramSocket(999, InetAddress.getByName("192.168.1.102")); ds.send(new DatagramPacket(new byte[10], 10)); } }[/CODE] Error: [CODE]Exception in thread "main" java.net.BindException: Cannot assign requested address: Cannot bind at java.net.PlainDatagramSocketImpl.bind0(Native … |
|
What happens when I set the value of an integer to NULL? I print it out / debug it, i get the value zero. Even I can use the NULL assigned integer to initiate another integer. Well, then what is the point of being NULL? Why set it to zero? … |
|
[CODE]#include<iostream> using namespace std; class Node { public: int data; Node *preNode; Node *postNode; //Node(){} }; int main() { Node testNode; Node testNodeB = testNode; return 0; } [/CODE] When I run the code, there occurs an runtime error, The variable "testNode" being used without being initiated. But when write … |
|
What is the difference between Structure and Class? Is there are any particular situations when I should use what? Once I implemented Binary search tree using structure. Now, I am trying to implement Red black tree using Class? But many discourages using class in this kind of situation, they say … |
|
Can anyone tell me how to compile "mingw-util 0.3"? I am a little confused, when some article says "use make command and it is all done".But "make" command in unknown in my command prompt.I have MinGW installed which comes with codeblocks. I need it to compile MySQL driver, to use … |
|
A Mobile App development contest is going on in our neighborhood.I want to make a 3d game for this contest. But, I am new in Smart Phone/Mobile device development.I have searched and found few mobile phone game engines, though, they don't specify their exact requirement from phone. After searching a … |
|
This code is supposed to get one int and one string.But after entering the int, the [B]getline[/B] line is acting weird...it dont prompt me for any string input, rather then it shows the same value as the int. [CODE]#include<iostream> #include<string> using namespace std; int main() { int teacherID; string teacherName; … |
|
I am trying to grab some data after opening a text file with append flag. I am using the following code...but nothing is being printed and program execution is progressing forward. Can anyone point me my mistake... [CODE] fstream outStream("test.txt", ios::app);string testID; cout << "Enter Teacher ID - "; cin … |
|
if i open a file ouput using [B]ofstream[/B] it's openmode is set to [B]ios::out[/B] and [B]ios::trunc[/B]... what I have to do, if I want to have only the ios::out flag...not the ios::trunc flag.Because, it is deleting all the previous contents. How do i undo this flag?or, what to do, if … |
|
I am trying to change some data indside a txt file, based on the input given by the user.The input file is [B]indata.txt[/B](The commented part is, what it holds).And the output file is [B]"outdata.txt"[/B]... The problem is with line 52 and 53.Notice that in the loop from line 55 to … |
|
No programs are running.Both is Visual Studio and Codeblocks... both are showing the following error, [B]LINK : fatal error LNK1104: cannot open file 'kernel32.lib'[/B] I have google it, some say setting environment to "C:\Program Files\Microsoft SDKs\Windows\v5.0" or reinstalling visual studio, or editing registry key "HKEY_CURRENT_USER\SOFTWARE\Microsoft\MicrosoftSDKs\Windows\CurrentInstallFolder"(i didn't find any MicrosoftSDKs under … |
|
Why Animal constructor is not being called by the declaration of the array? LINE 12 Isn't 10 instances of Animal class is being created with this line? [CODE]package javaapplication; class Animal { Animal() { System.out.println("Animal Constructor");} } public class Main { public static void main(String[] args) { Animal[] animal_obj = … |
|
I am new new in OOP stuff.I have read the Herbert Schildt's C++ reference.But it just gave me the idea, about how it work.Not how to make it work. I am read few chapters from "Object-Oriented Programming in C++ by Robert Lafore"(old edition featuring UML 1, i guess).But it was … |
|
This class when, it is not integrated with the main program, shows the following error....and I have no idea what it is trying to say.. :( :( [code] #include "character.h" Character::Character(DrawEngine *de, int s_index, float x, float y, int lives, char up_key, char down_key, char left_key, char right_key) : Sprite(de, … |
|
Why I try to run the following OpenCV program, it shows the following error : ---------------------------------------------------------------------- test_1.exe - Application Error The application failed to initialize properly (0x80000003). Click on OK to terminate the application. ---------------------------------------------------------------------- [CODE] #include "cv.h" #include "highgui.h" int main() { IplImage *img = cvLoadImage("C:\\face.bmp"); cvSetImageROI(img, cvRect(100,100, 100, … |
|
I want to take infinite number of strings using string class. Why string operator is not working in the following program? it is showing... error: no match for 'operator!=' in 'str != -0x000000001'| [CODE] #include<iostream> #include<vector> #include<string> using namespace std; int main() { vector<string> s_v; string str; for( ; ;) … |
|
Im trying to solve ACM - 10082 [URL="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=31&page=show_problem&problem=1023"]http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=31&page=show_problem&problem=1023[/URL] Judge is responding wrong answer...but, i have no idea why. Any suggestion? [CODE] #include<iostream> #include<string> using namespace std; char change(char x); int main() { string str1; getline(cin, str1, '\n'); transform(str1.begin(), str1.end(), str1.begin(), change); cout << str1; return 0; } char change(char x) … |
|
I have just started using CodeLite. [url]http://www.codelite.org/[/url] It looks impressive.... I was using Codeblocks.But it's lack of features and less frequent stable release has disappointed me.Though, it's subversion is very frequent. I am no expert, but CodeLite looks better then codeblocks. But, if it is better then codeblocks then why … |
|
I am trying to find the best cmplier for the C++ program. All answer will accepted. |
|
This simple code is producing weird output. I write a line and press enter, it echo's the line...well, supposed to...Because, sometimes, it is not showing. In code blocks, i can assume that when the program is returning zero the program is terminating correctly. I tried to figure out, when it … |
|
Im trying to solve a ACM problem 10189, LINK: [url]http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1130[/url] It looks ok to me...but, online judge is showing wrong answer... can anyone help me to figure out the problem. [CODE]#include<stdio.h> int row = 1, column = 1,i=0, j=0, a=0, b=0; char array[100][100] = {0}; int change(int a, int b) … |