132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Kuroshi

I am experiencing problems with this function: void move (Room&); For some reason the compiler is saying that this is a variable or field, here is the implementation: [CODE]void Monster::move (Room& room) { vector<int> iCoordinates; vector<int> jCoordinates; for (int i = x - 1 ; i <= x + 1 …

Software Development c++
Member Avatar for Kuroshi
0
328
Member Avatar for C# HELP

need major help on a address book in c# using strings that does the 5 stages below preferably code help required. 1 Add Entry 2 Delete Entry 3 Print Book to Screen 4 Edit a Record 5 Search for a record using either Surname, Firstname or Road Name

Software Development c#
Member Avatar for thines01
0
576
Member Avatar for Rass Saee

[CODE]using System; using System.Collections.Generic; using System.Text; class BaseClass { public virtual void method() { Console.WriteLine("BaseClass method"); } } class SubClass : BaseClass { public override void method() { Console.WriteLine("SubClass method"); } public void someMethod() { Console.WriteLine(); } static void Main(string[] args) { BaseClass var = new SubClass(); var.method(); var.someMethod(); } …

Software Development c c# c++
Member Avatar for arunkumars
0
104
Member Avatar for sk8ergirl

I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 …

Software Development java java-netbeans
Member Avatar for NormR1
0
506
Member Avatar for sk8ergirl

I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 …

Software Development java java-netbeans
Member Avatar for NormR1
0
707
Member Avatar for ahmedshayan

I am in desperate need of help... I were to create Operating System's Shortest Job First Preemptive Algorithm .... The problem is that I am not getting how to calculate the average waiting time of each process... HELP ! SJF.java: [CODE] import javax.swing.JOptionPane; import java.util.*; public class SJF { int …

Software Development algorithm java java-swing operating-system
Member Avatar for Ezzaral
0
3K
Member Avatar for EXpoZuR

My program needs to take the first 5 numbers from a file, sort them and print them out. Then take the next 5 numbers and sort just those 5 numbers and print them out. However, when I try to sort them independently it is sorting them all together as if …

Software Development c++
Member Avatar for EXpoZuR
0
103
Member Avatar for dancks

I haven't coded something this complex in C++ before and I haven't had time to really review. I'm making a game (well, foundations for a game anyway), with an external game library, Allegro. But I think the problems I'm having is more fundamental to C++ in general. Included is a …

Software Development c++
Member Avatar for dancks
0
301
Member Avatar for newbie14

Dear All, I am inserting a string value into my mysql db which had apostrophe with no problem because I do this when inserting. [CODE]String cleanMessage = oriMessage.replace("'","\\'");[/CODE] The problem when I try to read from the same table I tried like this [CODE]level2[0] = level2[0].replace("'","\\'"); String queryCheck = "Select …

Software Development java
Member Avatar for thines01
0
189
Member Avatar for Panathinaikos22

Hello, i want to ask, messing words in array is a good way to encrypt data? or can someone very easy to brake it here is an example [CODE] #include "stdafx.h" #include <fstream> using namespace std; // Decleration for functions void EncryptFile(char c[], int key1, int key2); void DecryptFile(string filename, …

Software Development c++ encryption
Member Avatar for VernonDozier
0
390
Member Avatar for EXpoZuR

I have to read numbers from a .txt file and sort them. I am trying to use selection sort. The .txt file looks like this: 3 33.3 92.5 4.5 6.29 5.3 94.3 -7.455 4.66 -9.33 -211.2 .03 .12 0.34 4.83 2.494 I am now working on the first 5 numbers …

Software Development c++
Member Avatar for EXpoZuR
0
219
Member Avatar for gourav1

let an integer say, x=0xffffff0; when i shift left 4 positions in it.it got negative. x=x<<1; doing this 4th time,number got negative. please tell why it is so.

Software Development java
Member Avatar for JamesCherrill
0
311
Member Avatar for Ahmed2

Hello every body I'm trying to iterate through a list for a certian number of times using a for loop. below is the current code I've written, but this will iterate through the list until it ends. [CODE]list<FileInfo*>::iterator p = currentlist.begin(); while(p != currentlist.end()) { cout << (*p)->remainingtime << " …

Software Development c++ programming-construct
Member Avatar for Schol-R-LEA
0
2K
Member Avatar for sharathg.satya

hi all Can we (compile and execute) or just execute a c file from another c file? am asked this question and i am unable to find any solution to this problem. A 'c' file is executed and it must contain code that will execute another 'c' program olease help …

Software Development c
Member Avatar for Narue
0
266
Member Avatar for JaffaApophis

Hello, I am trying to build a GUI with 2 textfields (1 for tutoring time & 1 for payment for session), a textarea (display the inputs in 2-D array & show report), and a few buttons (ENTER, RUN REPORT & QUIT). The two textfields are for the user to enter …

Software Development gui java java-netbeans session
Member Avatar for JamesCherrill
0
453
Member Avatar for marcux

Hi all! I am quite new to C++ and just been hacking with stdlib. When I want to start hacking other things outside stdlib, like network aso. I get confused and can not find what I am looking for. I use GNU/Linux and want to use "native" libs for that. …

Software Development api c++
Member Avatar for Schol-R-LEA
0
121
Member Avatar for NatherLaci

How can I give a (display) value to a textbox in form?

Software Development c++
Member Avatar for thines01
0
287
Member Avatar for Krstevski

Hello friends, I have a small problem and I need your help/hint... I want to compare two strings with ignoring cases but my program not works as I want... The program should compare if two strings contains same characters ignoring lower/upper and their order... For example, how should works my …

Software Development
Member Avatar for thines01
0
163
Member Avatar for gorbulas

Hello Having trouble reading in some 8-bit data (not text) from serial port using pyserial module. Am storing the data in a string buffer as it comes in, that's working fine. Problem is that I'm printing the buffer out to the terminal screen, after a wee bit of data (30~200 …

Software Development python
Member Avatar for Gribouillis
0
346
Member Avatar for EnderX

Does anyone know of a good site or doc that describes the ways to use a TStringGrid? I'm trying to figure out how to right-justify some of the items that are going to be placed into a TStringGrid, and none of the docs I've found so far seem to have …

Software Development pascal
Member Avatar for Micheus
0
162
Member Avatar for Lemony Lime

So, I have a two part question for you... I'm going to be writing several lines of code to a .txt file, but I won't know what each line is, or how many there will be. There could easily be hundreds of lines. I need to add a prefix to …

Software Development python
Member Avatar for gorbulas
0
226
Member Avatar for divsok

Suppose the xMethod() is invoked in the following constructor in a class, xMethod() is _________ in the class. public MyClass() { xMethod(); } A. a static method B. an instance method C. a static method or an instance method what is the answer a or b or c

Software Development java oop
Member Avatar for stultuske
0
1K
Member Avatar for chriswinter

I need this program to encrypt by making letter a letter z and b, y and so on. The proffesor got us started by giving us this program and for the life of me i can't figure out how to change it. [CODE] public class ceaser { public static void …

Software Development encryption java
Member Avatar for NormR1
0
298
Member Avatar for Eragah

Hi! Im a beginner in programming, and I have been given an assignment to program a TicTacToe game. I could not find any programs as such for reference over the Interwebs thus would want the expertise of daniweb users to help. The problem im having: 1. How do i transfer …

Software Development java
Member Avatar for NormR1
0
267
Member Avatar for glenak

Hi all, I'm working on a system that does a bunch of stuff, as well as monitors the current date on a system, checks it against a stored date in a database, and if both dates are exactly the same, sends an email automatically to a bunch of users. Now, …

Software Development email java
Member Avatar for NormR1
0
104
Member Avatar for arindam31

Hi Guys , this questioned has been asked before , but the answers haven helped me . I want to seperate lines when i am appending the text control. But "\n" is simply not working . I am using Python 2.7 , on Windows 7. Please help. I want to …

Software Development python
Member Avatar for arindam31
0
34K
Member Avatar for Panathinaikos22

Hello, as i know java source code is visible to ppl, i talk about Desktop Applets, i'm interested to start learn Java/Web Developing, that i want to know is, Can ppl see code of java applet in brwoser? like he can with Java Desktop Appis.

Software Development java
Member Avatar for jwenting
0
270
Member Avatar for spades0001

Hey guys! I created a facebook type program. The user may load an image, tag the image, and remove tags. I've done the loading of an image, now I'm working on tagging the image. My problem is how do i make it so that when I click the "Tag photo" …

Software Development java java-swing oracle
Member Avatar for StephNicolaou
0
221
Member Avatar for cvanithakpm

please help me by answereing my three question 1)page redirection is possible through which methods? 2) another question which is the default port number of jws? 3)we can write servlet programs by using http packages only ah?

Software Development java
Member Avatar for StephNicolaou
0
135
Member Avatar for vegaseat

Python does not have a type like struct in C or record in Pascal, but it can be easily implemented with a class. This little code snippet shows you how to do it.

Software Development pascal python
Member Avatar for Gribouillis
0
4K
Member Avatar for Danizand

I am trying to extract data from multiple files into one output file. At the moment I am able to extract the columns I want into a vector in a vector: [code] vector< vector<double> > out; //2D vector ofstream myfile ("example.txt"); //outputfile //the data contained in data[n][6] is put into …

Software Development c++
Member Avatar for Danizand
0
2K
Member Avatar for lisheen

Hi Again All, I have a Datasource which I query, works fine but when I package the application it can't find the datasource (which is an mdb file) how do I set the datasource to always look in the application path. I have tried [ICODE]str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= App.Path + …

Software Development visual-basic
Member Avatar for Jason2726
0
278
Member Avatar for mits28

[CODE]#include<iostream.h> #include<conio.h> #include<process.h> struct node{ int data; node *next; }; class Linklist{ node *ptr,*save, *head, *tail; public: void ncreate(); void display(); void insert(); }; void Linklist:: ncreate() { while(1) { ptr = new node; cout<<"enter info:"; cin>>ptr->data; if(ptr->data==-999) { return; } if(head==NULL) { head=ptr; tail=ptr; } else { tail->next=ptr; tail=ptr; …

Software Development c++
Member Avatar for WaltP
0
112
Member Avatar for javabeg123

i have to create a city application that prompts the user for a series of city names and then displays the number of city names entered and then the name of the city with the most characters in uppercase letters. how come it always output the last name entered ? …

Software Development java
Member Avatar for stultuske
0
233
Member Avatar for ItDir

I can not get labels to print on a Windows 7 64 bit machine. The program works on windows 7 32 bit. The error is [B]Can not Create OLE Objects[/B] [CODE]Public Class ArmsInput Dim strAssemblyCode As String Dim strLineID As String Dim strLabelPrinter As String Public strConnection As String = …

Software Development printer vb.net
Member Avatar for GeekByChoiCe
0
798
Member Avatar for subith86

Hi all, Sorry if this is a stupid question. Assume I have a code like this. [CODE] char *temp = "poiuytrewq"; std::cout<<*temp<<std::endl; //should print p function(temp); std::cout<<*temp<<std::endl; //should print i [/CODE] Basically my function() in the above snippet increments the pointer twice so that temp point to 'i' now. I …

Software Development c++
Member Avatar for subith86
0
179
Member Avatar for bhagawatshinde

Hi, How to avoid webbrowser data copy, paste to word or notepad in vb.net. Disable right click on webbrowser by using [ICODE]IswebbrowserContextmenuEnabled =false[/ICODE] Thanks in Advance...

Software Development vb.net
Member Avatar for bhagawatshinde
0
120
Member Avatar for initialfresh

The form is supposed to be able to take your their percentage grade out of 100 and the number of hours per week of each of their courses. The application will determine and output the GPA equivalent of each grade entered as well as the CGPA of all the courses …

Software Development c# visual-studio
Member Avatar for Mike Askew
0
3K
Member Avatar for Xaviorin

I'll keep it simple and hopefully whatever simple error I keep overlooking can be used as a learning experience for others. This program uses a user created file called patient.dat that contains the following: Smith Eleanore 110/73 Jones Tom 200/78 The error I am having is that Mr Tom Jones …

Software Development c++
Member Avatar for Xaviorin
0
239
Member Avatar for kelvin_8188
Member Avatar for iampord
0
74
Member Avatar for arjunpk

hi... i'm getting a null reference exception unhandled error..... i have inserted the code snippet and a screenshot... please tell me where i'm going wrong..... [CODE] DataSources[] dataSources; int i = 0; _list = doc.GetElementsByTagName("DataSource"); foreach (XmlNode tempNode in _list) { //MessageBox.Show(tempNode.Attributes["Name"].Value.ToString()); //MessageBox.Show(tempNode.InnerXml.ToString()); dataSources[i]=new DataSources(); dataSources[i].getContent(tempNode); i++; }[/CODE] the class …

Software Development xml
Member Avatar for theepan1
0
207
Member Avatar for coolbeanbob

Hello everyone, Like the headline says, my computer goes crazy when I run this program. The problem did not occur until I added lines 80-83. When the program is run, my computer starts beeping and weird characters show up on the console. Any thoughts on the problem and why it …

Software Development c++ queue storage
Member Avatar for WaltP
0
151
Member Avatar for azuresapphic88

I don't know what this problem is asking me to do : initialize both i and n in the same line. Initialize n to 0, and i to 0. This problem is in the Loop Chapter: for (int i = 0; i <= 5; i++) cout << i << " …

Software Development c++
Member Avatar for WaltP
0
87
Member Avatar for jcAmats

hi! can someone help debug my codes? getline() works properly in my main() but if i'm putting it to another function, it ignores the first getline() w/o entering any words and goes to the 2nd getline. my program works like this: i have a menu() that lets the user to …

Software Development c++ perl
Member Avatar for jcAmats
0
385
Member Avatar for EXpoZuR

Hello, I am currently doing an assignment where I have to read numbers from a .txt document into an array and later find the average of different lines of the .txt document sort them and what not. I'm not even close to the ladder parts of this assignment and I …

Software Development c++ file-system
Member Avatar for EXpoZuR
0
220
Member Avatar for ara_tul87

get error cannot find table although database already in correct path!. I also already put [B]SQLite.Interop.dll[/B] on my project file

Software Development sqlite
Member Avatar for ara_tul87
0
263
Member Avatar for rollingapes

I have to create a simulation to repeatedly play the Monty Hall game. I've created a class. This is what I have so far. I have created the buttons, activated them, deactivated the stay and quit buttons. I have a button class that is used to activate and deactivate buttons …

Software Development python
Member Avatar for rollingapes
0
185
Member Avatar for Rass Saee

[CODE]using System; using System.Collections.Generic; using System.Text; class BaseClass { public virtual void method() { Console.WriteLine("BaseClass method"); } } class SubClass : BaseClass { public override void method() { Console.WriteLine("SubClass method"); } public void someMethod() { Console.WriteLine(); } static void Main(string[] args) { BaseClass var = new SubClass(); var.method(); var.someMethod(); } …

Software Development c c# c++
Member Avatar for berniefitz
0
122
Member Avatar for Morten Brendefu

I am trying to write a few very dynamic procedures and functions and wonder about transferring parameters to a procedure as an Array. This is actually easy enough done.... just that I would like to pass something like [CODE] VAR a,b,c : INTEGER; Name, Text1,Text2 : STRING; todaysDate : TDate; …

Software Development pascal
Member Avatar for Morten Brendefu
0
1K
Member Avatar for terence193

I wrote this program and am trying to simplifying by creating a character array. How can this be done please? I found some help here [URL="http://www.java2s.com/Code/C/Data-Type/Forloopachararrayusingpointer.htm"]http://www.java2s.com/Code/C/Data-Type/Forloopachararrayusingpointer.htm[/URL] but couldn't really implement that in my program. [CODE] //inputs five strings representing integers, converts the strings to //integers, sums the values and prints …

Software Development c
Member Avatar for sfuo
0
108

The End.