132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for natostanco

Hello, the exercise says to define a group of locations to define months using a standard number of bytes, and to use 8 bit unsigned to set the number of days for each month... i wrote this DB 'GEN',31D DB 'FEB',28D DB 'MAR',31D DB 'APR',30D DB 'MAG',31D DB 'GIU',30D DB …

Software Development assembly
Member Avatar for natostanco
0
104
Member Avatar for Martje

Hello, How do i resize/stretch the image inside a pictureBox(win32 form)? i was only managed to resize/stretch the border of the pictureBox, but i want to resize/stretch the image itself, how do i do it?. Thank you in advanced.

Software Development c++ image
Member Avatar for Milton Neal
0
2K
Member Avatar for problemmaker

[CODE]java.lang.NoClassDefFoundError: Main Caused by: java.lang.ClassNotFoundException: Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: Main. Program will exit. Exception in thread "main" Java Result: 1[/CODE] after i had done my system. this error message pop up and restricted me …

Software Development java
Member Avatar for hanvyj
0
8K
Member Avatar for qvyhnl

Write the function my_strchr(). The function has two parameters: a const char * s pointing to the first character in a C-style string, and a char c. Return a pointer to the first appearance of c appearing inside s and NULL (0) if c does not appear inside s. Is …

Software Development c++
Member Avatar for Ancient Dragon
0
196
Member Avatar for aznlitomik3

Hi, I'm having an error when running this program and I don't know what kind of error is it. So hoping someone can help me. Thank You!! Program: The input file is created with positive and negative numbers. When program ask for the input file it should be the same …

Software Development c++ file-system
Member Avatar for Ancient Dragon
0
145
Member Avatar for Joemeister

Hi there everyone!! Struggling a bit with some Linked Lists combined with copy constructors as well as operator overloading. Here is the code of the header (.h) and the implementation file (.C). Hope that you can help! [CODE] /////////////////////////////////////////////////////////// ////////////////// //////////////////// ////////////////// Queue.h //////////////////// ////////////////// //////////////////// /////////////////////////////////////////////////////////// #ifndef QUEUE_H #define …

Software Development c++ linked-list queue
Member Avatar for phfilly
0
102
Member Avatar for DallasFan3

Ok, well Ive pretty much finished my program and now all thats left is this error that keeps coming up and I dont know how or where to fix it. The error comes up under the bracket. Iam guess Iam missing a bracket at the end, but when I put …

Software Development java
Member Avatar for hanvyj
0
164
Member Avatar for qvyhnl

Write the function my_strncpy(). The function has three parameters: a char * dest, a const char * src, and an int max, which represents the maximum size of the destination buffer. Copy the characters in src to dest, but don't copy more than max-1 characters. Make sure you correctly terminate …

Software Development c++
Member Avatar for Ancient Dragon
0
188
Member Avatar for MarounMaroun

Hello guys, Can someone explain what is going on on this code? 1. why we needed **p in the function [B]AllocString[/B]? 2. why if I change [B]AllocString(strlen(s), &copy);[/B] to [B]AllocString(strlen(s)-7, &copy);[/B] I can still get a good result? Thanks! [code=c] #include <stdlib.h> int main() { char *s="example"; char *copy=NULL; AllocString(strlen(s), …

Software Development c
Member Avatar for MarounMaroun
0
106
Member Avatar for tKc

I have an issues with my int array, i have a game where its like a mega version of Tic Tac Toe where you need 5 to win instead of 3 and i have tried to come up with a system of checking for a winner or not (right now …

Software Development c++
Member Avatar for StuXYZ
0
214
Member Avatar for Acidburn
Member Avatar for CezarPt
0
5K
Member Avatar for king_koder

Hello, I got stuck trying to solve the following problem in Python. I understand that I somehow need to implement Dijkstra's algorithm to solve this problem, but how I've no idea. [B]Inside a room, there is a monster with N heads, and a human (with 1 head). The human has …

Software Development python
Member Avatar for slate
0
508
Member Avatar for phfilly

Hi Everyone I'm busy preparing for my programming examination and I would really appreciate it if someone could just give me some references(websites) to some c++ programming exercises. I believe the best way to prepare for this kind of examination is to practice writing code and understanding it. Thanks!

Software Development c++
Member Avatar for phfilly
0
183
Member Avatar for merse

numeric_limits<double>::epsilon() gives the error of (double)1.0 in the sense that 1+epsilon is the next double value which is represented. But how can we calculate the error of arbitrary double number?

Software Development c++
Member Avatar for merse
0
179
Member Avatar for z_a

While reading Stroustrup's "The C++ programming language", I was puzzled at 'declaring a pointer to an array of character strings and declaring a reference to an array of 10 integers', and I had to clear my mind on pointers to arrays. I am posting here the notes I made to …

Software Development c c# c++
Member Avatar for z_a
0
456
Member Avatar for ronny22

Hi all I made this animation app and I think its all correct however i get a error message which is: Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at Animation.getScene(Animation.java:56) at Animation.getImage(Animation.java:49) at MainAnimation.draw(MainAnimation.java:64) at MainAnimation.movieLoop(MainAnimation.java:53) at MainAnimation.run(MainAnimation.java:34) at MainAnimation.main(MainAnimation.java:10) I cant …

Software Development app-store java java-swing
Member Avatar for ronny22
0
169
Member Avatar for low_coder

hey guys, i need to pass 'this' as the template function parameter.. any help will be appreciated.

Software Development c++
Member Avatar for low_coder
0
143
Member Avatar for jawadsatti

plz mention me the errors i dont understand what i do.. [CODE]#include<fstream> #include<iostream> #include<string> #include<ctype.h> #define _TABSIZE 4 using namespace std; int tabsize = _TABSIZE; class token { public: token() : _what(code) {} public: enum type {code, comment, pp, keyword}; string _str; type _what; friend istream& operator>>(istream&, token&); friend ostream& …

Software Development c++ html-css os-x
Member Avatar for Nick Evan
0
145
Member Avatar for qvyhnl

Write the function my_strrchr(). The function has two parameters: a const char * s pointing to the first character in a C-style string, and a char, c. Return a pointer to the last appearance of c appearing inside s and NULL (0) if c does not appear inside s. is …

Software Development c++
Member Avatar for qvyhnl
0
106
Member Avatar for ntgsx92

I want to write a code that sort a cstring and put all the correct character into a new cstring, Here is my Code. [CODE] #include<iostream> #include<cstring> #include<cctype> using namespace std; int main() { char array[200]={"How Are U?"}; char array1[200]; int n=0; for(int i=0;array[i]!='\0';i++) { if(islower(array[i])||array[i]==' ') { strcpy(array1[n],array[i]); n++; …

Software Development c++
Member Avatar for ntgsx92
0
103
Member Avatar for yap_1991

Hi all, I have a GUI and working programs, however I need to put the program into the GUI to make it work, but im experiencing the problem that my GUI codes are all in a class and my codes are in man different classes, is there a way to …

Software Development gui java
Member Avatar for yap_1991
0
206
Member Avatar for Anupama G

Hi, I have a textbox(placed inside a ItemTemplate) inside a gridview.I want to validate the text entered in the textbox for date(mmddyyyy format) values,without using any validation controls. Could anyone help me out with the C# code. Thanks in advance.

Software Development
Member Avatar for devi.....
0
934
Member Avatar for TheMightySpud

Hi all, Hopefully someone can help me out with this one. I have a form which gets populated by 15 buttons dynamically at runtime (these need to be dynamic as there will be a user config file at some point) What I need these buttons to do is to open …

Software Development gui vb.net
Member Avatar for GeekByChoiCe
0
142
Member Avatar for mashhype

Hi, I am trying to figure out how to get my program to do one of two things: Either... 1. Create and remove a semaphore based on me entering a 'r' in the command line at argv[1] or 2. If argv[1] is a 'n', then I want check to see …

Software Development c storage
Member Avatar for mashhype
0
259
Member Avatar for Duby

Please be patient with me for this is my time posting and I am still in the primitive stages of programming. I am using C++ VS. Thus far, the code I have written will prompt for a users first name, last name and telephone number(without dashes or parenthesis). The output …

Software Development c++
Member Avatar for Ancient Dragon
0
190
Member Avatar for kchadek

First off, yeah I know there are many codes out there for this, but how can one learn without doing. Ok So we need to write a code to see whether two words are anagrams of one another. Here is what I have, it compiles but does not work. The …

Software Development java
Member Avatar for apines
0
162
Member Avatar for gizmo7008

I'm trying to get what I put in the value for the database to output, however whenever I use a cout statement with the a.name I get an error on line 21 which is the line with the cout statement. I've done it the way it is in the examples …

Software Development c++
Member Avatar for gizmo7008
0
85
Member Avatar for stereomatching

Below is my code [code] string str2 = "1, 2, 3, 4, 5, 6, 7, 8"; string output; typedef std::tr1::sregex_token_iterator sti; const sti end; for(sti i(str2.begin(), str2.end(), regex(",\\s"), -1); i != end; ++i) { //output += "\"" + *i + "\", "; output += "\""; output += *i; output += …

Software Development c++ regex
Member Avatar for stereomatching
0
151
Member Avatar for mybluehair

I have a script that is using the internet protocol 'Curl' I am sending a http _POST to a php file. To send a post with curl, I need to make a char variable with all my info. for example "name=andrew&country=usa" Here is where the problem comes in - One …

Software Development c++ http-protocol
Member Avatar for Ancient Dragon
0
128
Member Avatar for apanimesh061

[CODE] class example { public static void main(string args []) { Sysytem.out.printIn (This is a simple Java program....); } } [/CODE] I am using Windows Vista Ultimate I tried to rum this program in DOS shell...... Error 1 :Exception in thread "main" java.land.NoClassDefFoundError : example I tried to remove it...by …

Software Development java windows-vista
Member Avatar for packetpirate
0
209
Member Avatar for .:Pudge:.

I get the error " no match for 'operator=' in '* n->node::child = root' in the "insert" method and I don't know how to fix it. I know it has something to do with pointers and the way I initialized the array. What I want to do is is put …

Software Development c++
Member Avatar for Ancient Dragon
0
183
Member Avatar for gbsn3219

Hello. I am relatively new to C++ programming, and I have a question about a program that I am supposed to write. The assignment reads... Prompt the user for a word; call it SEARCH. Then begin reading words from the user, counting them until SEARCH is entered. Display how many …

Software Development c c# c++
Member Avatar for gbsn3219
0
161
Member Avatar for jwill222

HEY GUYS I'M WORKING ON A CALCULATOR USING THE SCANNER CLASS. HOWEVER THERE IS A CATCH TO IT I CAN ONLY USE ADDITION AND SUBTRACTION TO CALCULATE ANSWERS. I HAVE TO MAKE IT INTERACTIVE AND ASK THE USER WHAT FUNCTION THEY WOULD LIKE TO DO(1.ADDITION,2.SUBTRACTION,3.DIVISION,4,MULTIPLICATION) I'M GOING TO USE A …

Software Development java
Member Avatar for jwill222
0
163
Member Avatar for tantii

hi im new to programming and i was told to create a dice game where a player rolls and the dice rolled will added to the total score until the score is reached its maximum limit but i cant get it to work.. my problem is i cant keep hold …

Software Development
Member Avatar for Momerath
0
331
Member Avatar for Nathaniel10

I have made revisions to my program. I gave up on the idea of using functions that return arrays. That was far too complicated for the expected benefit. This latest version compiles and runs correctly with all of the provisions required by the exercise. What remains is feedback on the …

Software Development c++
Member Avatar for Nathaniel10
0
149
Member Avatar for aleX_X

This is the sample code my proffessor posted online [CODE]import java.applet.*; import java.awt.*; public class AnAppletSubclass extends Applet { public void init() { System.err.println("Hello from AnAppletSubClass.init - the current value of n is " + n); color = Color.green; } public void paint(Graphics g) { setBackground(color); System.err.println("Hello from AnAppletSubClass.paint-- the …

Software Development http-protocol java open-source
Member Avatar for aleX_X
0
139
Member Avatar for meabed

[edit] This code was originally posted [URL="http://www.programmersheaven.com/dow...3/ZipView.aspx"]here [/URL][/edit] The problem is to find all ways of placing n non-taking queens on a n by n board. A queen attacks all cells in its same row, column, and either diagonal. Therefore, the objective is to place n queens on an n …

Software Development c++ objective-c vb.net
Member Avatar for bangonkali
0
894
Member Avatar for mommabear

I'm getting a few error codes on this part of my lab. I showed it to another colleague and he said that it should work as written. Maybe one of you can see the error that I'm missing. I'd love to be done with it and get it turned in. …

Software Development c++ visual-studio
Member Avatar for mommabear
0
243
Member Avatar for tom_cat

Hi, I have following questions, 1. I want to know that what is the difference between tcp tunneling and regular tcp client server chat program. 2. If I live in Sri Lanka, and I want to connect and pass data to a pc with a dynamic ip (a standalone one, …

Software Development c# client-server
Member Avatar for oredigger
0
2K
Member Avatar for Jaily

I'm trying to input numbers in a binary tree with an array of random integers. But all I get is two numbers, and they are always the same! From the main: [CODE] const int length= 10; // This is used several places, hence the const int array[length]; // One of …

Software Development c++
Member Avatar for Jaily
0
156
Member Avatar for gedas

hey guys, i have a little problem i have got a method that removes the line of text in a file. for example if i specify a name and the name is on one of the lines in the file.txt it would remove it. what i want is that once …

Software Development file-system java
Member Avatar for gedas
0
97
Member Avatar for Goyle

Hi there, i just joined this forum in hope improving my Programming skills. Currently i have a college assignmnt. It is to create a dice game "There is a little known dice game which is played with a pair of dice and has the following rules: the player keeps rolling …

Software Development java
Member Avatar for Goyle
0
103
Member Avatar for titan5

I need to create a large integer array but I am not able to increase its size beyond max int value. How do I create larger arrays?

Software Development java
Member Avatar for afas87
0
4K
Member Avatar for LianaN

Hi! I'm trying to create String array from ArrayList. This task seems to be trivial, however I have a problem because of using "interface". The code and error message are shown below. Please, give me some advices to solve this problem. Thanks! [CODE]public class Class1 { public List<myInterface> getAllTasks() { …

Software Development gui java
Member Avatar for kramerd
0
676
Member Avatar for nipponsahore

hey everybody ... well im facing this difficulty .. i made one project .. and im not able to .. create a jar for it my project consists of the following files a package Prj that contains all the classes along with it i have 2 files.. with contain some …

Software Development java
Member Avatar for nipponsahore
0
64
Member Avatar for techfish

I get a Segmentation fault error and I cant find what's wrong with the program. programs fails when it tries to execute this line "delete [] this->courseList" in operator = overloading function. [CODE=c] #include <iostream> #include <string> using namespace std; class Student{ private: //A string that stores the name of …

Software Development c++
Member Avatar for arkoenig
0
827
Member Avatar for LianaN

Hi! Does somebody know how to get the total number of MenuItems in JPopupMenu? I'm searching for something like, popupmenu1.getNumberOfMenuItems(). I need it for the FOR statement [CODE](for int i=0; i<popupmenu1.getNumberOfMenuItems(); i++) { ... } [/CODE] Thanks!

Software Development java
Member Avatar for LianaN
0
130
Member Avatar for rayden150

[CODE] import javax.swing.*; import javax.swing.JFrame; public class Ejer1 { public static void main(String [] args){ JFrame frame = new JFrame (Box); frame.setVisible(true); frame.setSize(300,300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel label = new JLabel(); JPanel panel = new JPanel(); frame.add(panel); frame.add(label); System.out.println("*********"); System.out.printf("%s\n%s\n%s\n%s\n%s\n", "* *","* *","* *", "* *", "* *","*", "* *","* *","* *","* …

Software Development display java java-swing
Member Avatar for kramerd
0
229
Member Avatar for stvnddich

I need to write a program that generates a magic square of an odd number between 3 and 15. I have written out this much code, and when i type in 3 for the number it gives me the correct square. but any other odd number it gives me an …

Software Development c++ ios
Member Avatar for stvnddich
0
144
Member Avatar for dave1970

Need idea for start this program.....? Consider the following Student class specification: public Student() //CONSTRUCTOR Initialized the attributes public String name () This Student’s name public String address() This Student’s address public String matric () This Student’s matric number public int creditHours () Number of credit hours this Student enrolled …

Software Development java
Member Avatar for stultuske
0
235

The End.