87 Topics

Member Avatar for
Member Avatar for techie1991

Even after looking at a lot of books, I am not able to understand the problem in the following code: [CODE] //1.c static int y=23; void abc(int a){ printf("%d\n",a); } [/CODE] [CODE] //2.c #include<stdio.h> #include "1.c" int main(){ abc(12); printf("\n"); printf("%d\n",y); return 0; } [/CODE] I can understand that the …

Member Avatar for techie1991
0
233
Member Avatar for SMITA6076

I have two classes. The first class is called [ICODE]EmployeePayRoll.java[/ICODE] (this compiles fine) and the second is called [ICODE]TestEmployeePayRoll.java[/ICODE] (this does not compile). The trouble I'm having is that I'm trying to pass in methods as parameters when I instantiate my objects in the main method of the test class. …

Member Avatar for SMITA6076
0
291
Member Avatar for lacoffo

Hello everyone :) I'm learning Java and I'm creating a pong game. There is something I don't understand how to do though. It's how do I make it so that when a button in one panel is pushed, it calls a method in another panel. Let me quickly explain the …

Member Avatar for lacoffo
0
825
Member Avatar for brothman

Hey... don't know why this is happening... I've probably I've done this or things like itat least a few times before... [CODE] public class FileTree { public static DisplayWindow window; public void refresh() { DisplayWindow temp = FileTree.window; //temp.pack(); } public static void main(String[] Args) { window = new DisplayWindow(new …

Member Avatar for JamesCherrill
0
162
Member Avatar for ritu143

Hi, I am new to c++, facing difficulty in compiling the following code [CODE]#include <iostream> #include<string.h> using namespace std; class myclass { public: int i, j, k, *l; // accessible to entire program static int *m; }; int myclass::*m = NULL; int main() { myclass a, b, *p; a.i = …

Member Avatar for rubberman
0
2K
Member Avatar for zahnsoftware

What are some ways to connect to one computer from another other than using VPN or a Static IP? Let's say, for example, one computer is hosting a web service and another computer that's not part of the network wants to call that web service. Would it be possible without …

Member Avatar for lasitha2005d
0
327
Member Avatar for Vindal

Hello, I am having some troubles with coding from one of Joyce Farrell's books here is a link showing the exact thing to which I am trying to figure out. [URL="http://books.google.com/books?id=akzWMS9_PYoC&lpg=PA327&dq=BankAccount%20Class%20from%20Joyce%20Farrell&pg=PA331#v=onepage&q&f=false"]Exact question[/URL] Here is the code I have written thus far. [CODE]#include <iostream> #include <iomanip> using namespace std; class BankAccount …

Member Avatar for jonsca
-1
159
Member Avatar for neptunethought

static List<int> what is List<int> what kind of syntax is that and where can I find info on List<Int> I have enver used it. please help

Member Avatar for Momerath
0
106
Member Avatar for JOSheaIV

Okay so about a year ago I took a usual college class on C# and since have been addicted to the language, I love writting in it. But I have been puzzled by an issue that I have never figured out, and I decided it's finally time to ask for …

Member Avatar for Ketsuekiame
0
253
Member Avatar for Nitin Daphale

In my project each user can upload his logo images. For that am using a static function to FTP files. In that function am using many static variables. Now I want to ask that,is it safe using static functions for functionality like this?

Member Avatar for kvprajapati
0
103
Member Avatar for erogol

I know the concepts and I think about the advantages and disadvantages of each one over other one. However, I also want to here your ideas about these concepts. What advantages they have over each other? What is the purpose behind using one of the concepts? Thanks...

Member Avatar for MosaicFuneral
0
126
Member Avatar for daudiam

Why do local inner classes not allow static variables ? The static fields of the classes could at least have been allowed access from the local method ?

Member Avatar for ~s.o.s~
0
162
Member Avatar for yuri1969

Hi, I'm fighting with [B]make[/B] for hours and I rly don't know where is my problem. I need to have a static lib libxml.a and an application (make.c) which uses it. I tried to compile it under GCC 4.4.5 and 4.5.0 and the compilation run fine. But under GCC 4.3.2 …

Member Avatar for Martin B
0
2K
Member Avatar for Mehwish Shaikh

Hello All, I am having some troubles with my code, which is: [code] import java.net.*; import java.io.*; class TestInet { public static void main(String args[]) { try{ InetAddress inet = InetAddress.getByName("72.14.203.106"); InetAddress inet1 = InetAddress.getLocalHost(); InetAddress inet2[] = InetAddress.getAllByName("www.google.com"); //InetAddress inet3 = InetAddress.getHostName(); System.out.println ("Host of IP is[inet.getByName]: " + …

Member Avatar for maclord
0
360
Member Avatar for bbman

alright, I'm a bit stuck here, I've tried a few things but I can't figure it out. Question is in the source: [code=c++] // test.h namespace test { class foo { static void test(); }; } [/code] [code=c++] // test.cpp #include "test.h" namespace test { // how can I define …

Member Avatar for bbman
0
132
Member Avatar for suta123

Excuse me, is I am new to Java and want to do an attribute (final)and static. The problem is that first I need to instantiate and then, using a method to give its final value. I need something this: [CODE] public static final int MyConstant; public void createConstant(int pValue){ MyConstant …

Member Avatar for masijade
0
133
Member Avatar for daudiam

I was reading an SCJP book by Khalid Mughal and I came across a statement [QUOTE]Enum constants are static members[/QUOTE] and another [QUOTE]Enum constant is an instance of its enum type[/QUOTE]. I am unable to reconcile the 2 statements. Are the constants static members or are they instances ? (Instances …

Member Avatar for daudiam
0
361
Member Avatar for new_programmer

I want detailed explanation about static int var; final int var; static final int var; Please explain it in the memory implementation level. If there is any mistake in these please explain. __________________

Member Avatar for masijade
0
420
Member Avatar for liran ritkop

Hi all.. I am new to apache and i have some questions about it.. i cross compiled it on an hawkboard, which has ARM arch'. the main question is how to make apache use as minimal as possible, for example, when i use the 'top' command on the target i …

Member Avatar for rch1231
0
174
Member Avatar for Virangya

hello, Im creating a registration page and i want to keep the user entered data after a generation of an error message. form and the validations are in separate pages and validations belongs to a class. html form <form id="frmregister" name="frmregister" method="get" action=""> <tr> <td><label>First Name </label></td> <td colspan="2"><input name="txtfname" …

Member Avatar for Virangya
0
148
Member Avatar for Virangya

Hello.. i have this problem.. im doing some kind of late static binding. im really a new to this and don't know how to solve this problem. please help me to solve it... What i want to do is instead of using `static:: $arr[0].",".static:: $arr[1]` i want to iterate though …

Member Avatar for somedude3488
0
133
Member Avatar for random12810

Which is better Double Buffering or assigning to a Static Control. I would like an example of double buffering or both. This is my bitmap code. [CODE] #include <windows.h> #include <tchar.h> #include <stdlib.h> #include <string.h> #include "Menu.h" #include "Icon.h" LPCTSTR ClsName = L"App"; // Class name LPCTSTR WndName = L"WindowsAPI"; …

Member Avatar for random12810
0
291
Member Avatar for haboota

Hi, I'm a newb so go easy on me ok :) I have a blog directory site that I built in static html a few years ago never expecting it to take off, but it has, and now I really need to move all of the info to a database …

Member Avatar for WebspoonUK
0
91
Member Avatar for yila

two static arrays size 10 need to be copied to an empty target array size 20. like this: you copy from the first array the nums till arr1[i] = 0 then you switch to the second array and copy to the nums till arr2[i] = 0. then you switch back, …

Member Avatar for yila
0
158
Member Avatar for nomemory

Hello, regarding OOP I have Java background, and I usually think in java when I code OOP in python (which sometimes is actually a bad thing). [CODE=python]#!/usr/bin/python class Card(): SUIT = { 'C':'Clubs', 'D':'Diamonds', 'H':'Hearts', 'S':'Spades' } VALUES = { '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, \ '10':10, …

Member Avatar for nomemory
0
385
Member Avatar for Geekitygeek

In the simplest of terms, a Class is like a cookie cutter. It describes what members and methods an object should have. You use the cookie cutter (class) to make (instantiate) one or more cookies that are all the same shape. The cookies are called objects. The same way that …

Member Avatar for ddanbe
2
489
Member Avatar for dottomm

Hello everyone, and thank you in advance for any tips you may be able to provide. I am hoping there is a way to do paging with static html content with php? I have to redesign a very text-heavy site and would like to limit the page lengths of the …

Member Avatar for dottomm
0
156

The End.