1,359 Posted Topics

Member Avatar for sushants

No, Rubberman has a point (pun intended). While the client-programmer cannot use pointers in Java itself, the language does use references, and most if not all of the various implementations do use pointers internally to implement references. The Oracle reference implementation (which is closed-source, but known to be written in …

Member Avatar for sushants
-2
162
Member Avatar for MasterHacker110

As Rubberman alluded to, on modern processors, memory is not unitary. Most CPUs today break memory up into pages - blocks that can be manipulated my the hardware memory mangaement system - and mark the individual pages as to whether their contents can be modifed or not, and whether they …

Member Avatar for MasterHacker110
0
144
Member Avatar for Labdabeta

According to your personal profile, you are runing Windows 7, which means you are running an x86 processor, either a 32-bit system or (more likely, if it is running 7) a 64-bit 'long' mode system. There are several assemblers for Windows - Macro Assembler (MASM), Gnu Assembler (GAS), and Netwide …

Member Avatar for Labdabeta
0
558
Member Avatar for jason.angeles.75

The first one is simply a misspelling in the definition of the `showKilometers()` method. The second is that you declared `showFeet()` ad type `void`, when it should in fact return a `double`. On a related not, you need to have the actual `return` statements in the three 'show' functions: public …

Member Avatar for stultuske
0
253
Member Avatar for MRehanQadri

Unfortunately, there is no real answer other than to read the file contents after the point of insertion, and re-write them with an offset equal to the size of the text you are inserting (one byte, in this case). Given the size of the file, it may be easier to …

Member Avatar for MRehanQadri
0
231
Member Avatar for ppajak

Sorry for the delay in getting to this, I missed it when it was on the front page earlier in the week. For the first case (line 7), I am guessing that the problem is that the MARS assembler doesn't support adding two immediate sub-values. The simple solution is to …

Member Avatar for Schol-R-LEA
0
5K
Member Avatar for siss

The code as given won't work; the indentation is all off. Here is the program with what I presume is the correct indentation:` import getopt import sys import hmac import hashlib import base64 import urllib def formattedCmd(api, cmd): s = 'apiKey=' + api + '&' + cmd return s def …

Member Avatar for TrustyTony
0
503
Member Avatar for MasterHacker110

There is also an Objective-C front-end for GCC that is available on any platform that support GCC, so it is certainly available for Windows. The interesting thing is, Objective-C actually predates C++ by about a year, at least as a publicly available language ('C with Classes' was in development as …

Member Avatar for Schol-R-LEA
0
325
Member Avatar for vadimak

A few questions: * Is this a Point of Sale system for an actual shop, or a school project? * When you say that you need to input a barcode, do you mean you would type in an SKU number by hand, or do you actually need to scan barcodes? …

Member Avatar for vadimak
0
545
Member Avatar for rpcob

**Captain119**: Actually, in C++ you *can* overload the names of functions; the issue is that you have to give each of the different functions sharing their name a different *signature*. The real issue is that the OP made a mistake in the second function's declaration; it should be something like …

Member Avatar for Captain119
0
4K
Member Avatar for paa.klose2

It goes without saying that *some* sort of software is needed for programming; at minimum, you need an editor and a program trnaslator of some type. As Matt1998x points out, there is some software for programming installed already on just about any computer you might have. Windows includes Notepad and …

Member Avatar for Schol-R-LEA
0
121
Member Avatar for siss

Assuming that you are running the Javascript in a browser rather than as a stand-alone program, then the answer is 'no'. The example code above reads a set of arguments from the shell, something which Javascript cannot do - the closest equivalent would be reading data from the web page's …

Member Avatar for TrustyTony
0
176
Member Avatar for ngkevi1994

I know that you are only a beginner and may not be comfortable with such things, but I would recommend that you a) come up with a class that holds the area descriptions, rather than hard-coding each one in, and b) storing the data for each of the areas in …

Member Avatar for Lucaci Andrew
0
392
Member Avatar for tony75

First off, The reason that it is showing the title bar of the window is because you *asked* for the title bar of the window. If you are opening a MS Word window, and haven't saved the document yet, then it will show the default document name - which in …

Member Avatar for tony75
0
781
Member Avatar for fmasroor

Let's not drag up old, dead threads, shall we? Please, check the dates on the threads before you post.

Member Avatar for Schol-R-LEA
0
26K
Member Avatar for Necrozze

You might want to look into using the PyGame [Sprite class](http://www.pygame.org/docs/ref/sprite.html) for the bullets, as it includes built-in colission detection. For that matter the regular [Rect class](http://www.pygame.org/docs/ref/rect.html) has several collision detection methods which could be of use, though they aren't as fine-grained as the Sprite methods are.

Member Avatar for Lucaci Andrew
0
565
Member Avatar for sihled1

Actually, the way you accept the input should be seperate from the way you add the user record, if only for modularity's sake. You want to break adding a user record down into five steps: * input - get the username and password. * encryption - converting the password into …

Member Avatar for Schol-R-LEA
0
182
Member Avatar for silvercats

As for your question about heap memory, [this post](http://www.daniweb.com/software-development/cpp/threads/425578/only-delete-pointers-declared-with-new-operator#post1819772) should help clarify how memory is allocated and used. It is written from a C/C++ perspective, however, so there is more to be added about it. The first thing you need to know is that objects in C# are always in …

Member Avatar for silvercats
0
761
Member Avatar for aVar++
Member Avatar for Schol-R-LEA
0
251
Member Avatar for zarnish

Can you gives us at least some idea of what you need? Aside from code, that is - no one here is going to give you a working program, gratis, without you providing the majority of the work. DaniWeb is not a homework-completion service, and if that is what you …

Member Avatar for zarnish
0
324
Member Avatar for noor.beetna

OK, sounds fine. What problems are you having with it? Can you show us what you've done so far, if anything?

Member Avatar for zain.imtiaz
0
136
Member Avatar for ram619

COuld you please give us some more information about the way the program is failing, e.g., error messages, the stack trace, and similar information? Also, what version of Python are you using? The code you posted is for Python 2.x; if you are running Python 3.x, it would fail, because …

Member Avatar for ram619
0
13K
Member Avatar for sai.aleenus

I'll assume from [a previous related thread](http://www.daniweb.com/software-development/c/threads/451955/hookes-pattern-search-optimisaton) that you are using Turbo C++, which is unfortunate but I know there's nothing to be done about it (except protest to the government University Standards board, which I understand is probably futile). Therefore I'll limit my comments about the headers to a …

Member Avatar for sai.aleenus
0
224
Member Avatar for codys21

I know it doesn't address the problem you are having (directly, anyway), but I would recommend creating an auxiliary class `GradeBookEntry`, which would hold the actual details of the student records, rather than having a series of parallel arrays which need to be synchronized manually. class GradeBookEntry { final static …

Member Avatar for bguild
0
500
Member Avatar for TUNG810810

Actually, the problem statement very clearly says to use C and assembly, not C++. I think you are confused about what language you are supposed to be using.

Member Avatar for Ezzaral
0
543
Member Avatar for Violet_82

Basically, what it comes down to is that you have both of the return clauses inside of an if/else statement, and the compiler does not have the ability to determine for certain that at least one of the options is guaranteed to run. The solution in this case is simple: …

Member Avatar for Violet_82
0
172
Member Avatar for Ayesha_2

First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework for them***. Sensing a pattern here yet? No one here will simply hand you a solution on a silver platter. If you show …

Member Avatar for Schol-R-LEA
0
143
Member Avatar for Violet_82

In the first set of declarations, the variables are *local* to `main()`; they only exist inside `main()`, and only for the time that the program is running. You can print the variables from `main()` just as you have them now. In the second set of declarations, the variables are *instance …

Member Avatar for Violet_82
0
183
Member Avatar for stupendousomega

Not such that you could use them by that name, no. In C, all variables must be declared at compile time. You *can* allocate memory at runtime, using `malloc()`, but you would still need a declared pointer to refer to such memory. Could you give more detalis as to why …

Member Avatar for Ancient Dragon
0
166
Member Avatar for tingwong

BTW, where is the `BinaryNode` generic class defined? This seems to be a crucial omission. I think that the crux of the matter is that you have misunderstood what the`String` class's `getBytes()` method does. What it returns is an array of bytes containing the raw representation of the chracters themselves …

Member Avatar for Schol-R-LEA
0
1K
Member Avatar for Labdabeta

There really isn't any formal definition of the format, unfortunately, at least not one that Microsoft has seen fit to share with anyone. Their own recommendation is to always use their library functions to manipulate BMPs, and any other approach is likely to be incomplete, as they deliberately keep the …

Member Avatar for Labdabeta
0
695
Member Avatar for tobinhoadesanya

* Develop an extension of the ELF object format and the Unix `ld` linker that allows for C++ template functions to be separately compiled. Kudos if you can fit the extension into the existing format without changing the underlying structures, such that existing linkers can still use the extended format …

Member Avatar for tobinhoadesanya
-1
580
Member Avatar for hajkmusic

**veducator**: Please use the modern C++ headers in the future. The C++98 standard removed the `.h` extensions from all standard headers, such that `<iostream.h>` (for example) is now just `<iostream>`. Similarly, the standard headers for the C standard libraries to be prepended with a `c`, for example, `<stdio.h>` is now …

Member Avatar for JasonHippy
0
245
Member Avatar for tony75
Member Avatar for daniel1977

OK, first off, you are making one of the classic mistakes mew C++ programmers make: putting the implementation of non-template classes inside the header file. Header files ought to have only global declarations, class and struct definitions, and preprocessor directives (templates are an exception to this, because of the limitations …

Member Avatar for daniel1977
0
355
Member Avatar for Lakhan Thakur

Try [this tutorial](http://eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx) on the subject; while the references to specific architectures is a bit dated, it is nonetheless generally accurate.

Member Avatar for Moschops
0
169
Member Avatar for gladys.moyo.180

While I doubt that HappyGeek's answer is quite what you were looking for, the truth is that we can't give much more of an answer without a lot more information from you. What, if anything, do you already know? WHat would you like to learn about? Computer programming is a …

Member Avatar for Schol-R-LEA
0
116
Member Avatar for bumrush

OK, this is a very peculiar way to do this, but if that's the assignment, there's nothing to be done for it. I take that back. It's a *ridiculous* way to do it. Are you certain that you're supposed to have three different matrices in a single object? Normally, I …

Member Avatar for Schol-R-LEA
0
11K
Member Avatar for pooran.c

The main issue is actually with your format string; for month, you should use capitalized letter M. Similarly, for 24-hour time going from 00 to 23, you need to use capital H. To get the time zone in the format you want, use the capital letter Z twice. "MM.dd.yyyy HH:mm:ss …

Member Avatar for pooran.c
0
2K
Member Avatar for old_apache

Could you explain a bit more about what you need? It isn't enitrely clear what sort of help you are looking for.

Member Avatar for old_apache
0
192
Member Avatar for saurabh.mehta.33234

You will need to you double indirection, i.e., a pointer to a pointer. #include<stdio.h> void swap(char **a,char **b); int main() { char *p[2]={"hello","good morning"}; swap(&p[0],&p[1]); printf("%s %s",p[0],p[1]); return 0; } void swap(char **a,char **b) { char *t; t = *a; *a = *b; *b = t; } Not entirely obvious, …

Member Avatar for Schol-R-LEA
-1
197
Member Avatar for 123mehran

Test what, our patience? Seriously, even if anyone here were inclined to simply provide code to you - which we are not - you would need to give a lot more detail about what you need. One of the forum rules states that, when posting for help with a program, …

Member Avatar for ftangpos
-1
183
Member Avatar for Hazuan Nazri

First off, you should know general Java programming, as Android is based on Java. I would start with [Oracle's Java Documentation](http://docs.oracle.com/javase/7/docs/), and a good book on the topic such as *[Thinking In Java](http://mindview.net/Books/TIJ4)* (if you can't afford the e-book, the [previous edition](http://www.mindview.net/Books/TIJ/) is available for free). You will also want …

Member Avatar for peter_budo
0
274
Member Avatar for TheNewbie1234

By weird, what exactly do you mean? The backgrounds on both appear to be gray, is that what you are referring to? If I were you, I would reconsider my design, and specifically, I would want to have some sort of parent `GameObject` class which the other elements could inherit …

Member Avatar for Schol-R-LEA
1
1K
Member Avatar for Necrozze

Rather than the standard Python time methods, I would recommend using a PyGame Clock object, as the Clock.tick() method is specifically designed for this sort of thing. I would also take the time out to re-write the code with classes. My own version of this now has a `GameObject` class …

Member Avatar for Necrozze
0
389
Member Avatar for ddannieellee

More importantly, **what** `newline()` function? Python doesn't have one, AFAIK. To print a newline, you use `print()` with no arguments.

Member Avatar for HiHe
0
318
Member Avatar for GaryWazHere

Just as an aside, you can remove the `#include`s for `<stdio.h>` and `<stdlib.h>`; you never use `<stdio.h>`, and `<stdlib.h>` is the C version of `<cstdlib>`. Just something I figured I would point out. Given the number of places where you are writing out a series of characters on a given …

Member Avatar for GaryWazHere
0
1K
Member Avatar for Ismatus3

> Thank you pyTony , but i can't use Classes , i try to define a cliquable area in my close to my label. If you don't mind me asking, why can't you use a class? Is it a case where you can't (i.e., you aren't familiar with developing them), …

Member Avatar for Ismatus3
0
295
Member Avatar for zenooo

First off, we don't do other people's homework for them. Second, we don't do other people's homework for them. And third, we don't do other people's homework for them. Sensing a pattern here yet? No one here will simply hand you a solution on a silver platter. If you show …

Member Avatar for Liuqahs15
-1
132
Member Avatar for Faith.Moraa

What sepp2k says is correct, but I suspect that there is more to this that may be relevant. What is the script supposed to do, and how many different codes are there? If there are more than two or three different ones, you may want to use a dictionary to …

Member Avatar for Schol-R-LEA
0
142

The End.