132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for lotrsimp12345

I am trying to create a double pointer. never done it before. Problem is currently in intializepopulation(); Error C2106 left of operand must be l-value. EA.h [CODE] #ifndef EA_H_INCLUDED #define EA_H_INCLUDED #include <string> #include "phrase.h" #include <iostream> class EA:public phrase { public: EA(); ~EA(); void setgenerationnumber(int generationnumber); int getgenerationnumber(); void …

Software Development algorithm c++
Member Avatar for lotrsimp12345
0
110
Member Avatar for winecoding

just starting to learn C++, and sort of confusing about the following section of code: [CODE]int *getCharCountArray(char *str) { int *count = (int *)calloc(sizeof(int), NO_OF_CHARS); int i; for (i = 0; *(str+i); i++) count[*(str+i)]++; return count; }[/CODE] In specific, do not quite understand how the following two work? [CODE] for …

Software Development c++
Member Avatar for mrnutty
0
96
Member Avatar for techie929

Hi, I need to read 4 bytes from file to form a 32-bit unsigned integer X. The first byte you read goes into the most-significant byte of X, the 2nd byte you read goes into the 2nd most-significant byte of X, the 3rd byte you read goes into the 3rd …

Software Development c++
Member Avatar for WaltP
0
2K
Member Avatar for gabz16

Please help me add actionlistener ect. to my puzzle program so that i can move the tiles into ascending order..Here is my code.. [code]import javax.swing.*; import java.awt.*; import java.util.Random; public class Rand { private JButton btn[]=new JButton[16]; public static void main(String args[]) { Rand app=new Rand(); } public Rand(){ JFrame …

Software Development java java-swing puzzle
Member Avatar for gabz16
0
235
Member Avatar for limengfang77

Need help on this array problem, thebolded part is what I'm really confused, How can I check if the user entered a negative value? and How can I return the [B]count [/B]to the previous cout? thanks 2. Write a function to read in numbers and put them into the array. …

Software Development c++
Member Avatar for WaltP
0
150
Member Avatar for mks200

hi, this is the problem, i wrote what i could but i dont know what im doing wrong 1. Write a function to read in numbers and put them into the array. The function should continue to read in numbers until either: the user types a negative number, or 5 …

Software Development c++
Member Avatar for WaltP
0
254
Member Avatar for lotrsimp12345

its it skipping. This is the part of the code. :( cout<<"enter a string\n"; getline(std::cin,phrase); [CODE]#include <iostream> #include <string> #include "phrase.h" #include "EA.h" #include <cstdlib> #include <time.h> int main() { phrase a; EA b; std::string phrase; int populationsize; //int percentmutation; std::cout<<"enter a population size\n"; std::cin>>populationsize; b.setpopulationsize(populationsize); //std::cout<<"enter the percentage you …

Software Development c++
Member Avatar for jonsca
0
87
Member Avatar for jeffery12109

UnboundLocalError: local variable 'gold' referenced before assignment ...[CODE]if chooseItem == "1": gold, arrows, whip, cannnonballs, heartPotions, megaHeartPotion, infinityPotion, infinityXPotion, duelBloodXXHealer, bloodXHeal, energyYPotion, basicRainbowHealer = bloodXHealerZZ.buy(gold, arrows, whip, cannnonballs, heartPotions, megaHeartPotion, infinityPotion, infinityXPotion, duelBloodXXHealer, bloodXHeal, energyYPotion, basicRainbowHealer)[/CODE]

Software Development python
Member Avatar for Stefano Mtangoo
0
215
Member Avatar for web81

Hello all can you help me up with this guys.. i have this application with a product id which is in Hexadecimal format..wat i mean is an alphanumeric format.. and it is asking for a product key.. how can i suppose to know the product key? can you give me …

Software Development visual-basic
Member Avatar for WaltP
0
826
Member Avatar for Darkicon

My app uses a verification method for users of downloading a text file which contains game-ID's of the users and checking the file with their game-ID. The problem is, the code I'm using to download it is kinda messing the file up. [CODE=VBNet] Public Sub GetIDList() Dim wr As HttpWebRequest …

Software Development file-stream file-system vb.net
Member Avatar for kvprajapati
0
150
Member Avatar for ssmokincamaro

I'm making an archery game and I need to shoot 5 arrows and assign a point value to each spot of the target. Bulls eye is worth 9 and each ring out from there is worth 2 less. I am having trouble figuring out how to assign a score to …

Software Development gaming image python
Member Avatar for ssmokincamaro
0
2K
Member Avatar for techie929

Hi, I have to create a maze in C++. // Below is the problem Statement Let's use a simple case of a w=4 (columns) by h=3 (rows) maze to illustrate the maze-generation algorithm. We will start with 4 × 3 = 12 closed rooms, arranged in a 4 by 3 …

Software Development algorithm c++
Member Avatar for Lerner
0
104
Member Avatar for pythonNerd159

just need some advice on making a list containing values for Tkinter buttons. thankyou :)

Software Development python tkinter
Member Avatar for pythonNerd159
0
134
Member Avatar for enderland

Hello all, I have a few questions about C++ (I have programmed quite a bit in VBA and some in the past using C++, and have been working through relearning C++). Currently I am working through a bit on the "Char" variable type. regarding the following (from the FAQ): * …

Software Development c++
Member Avatar for jonsca
0
194
Member Avatar for Hitman908

Im having trouble coming up with the java code for this. Can someone help me? First 3 month month-by-month account balance in your bank savings account. You need to make one, only one transaction-a deposit or a withdrawal-each month. Interest is added to the account at the beginning of each …

Software Development java
Member Avatar for masijade
0
222
Member Avatar for pilsdumps

Hi, Just learning WPF and I wondered if there's an easy way to amend a controls control template with c# code? To explain - I'm using two 'types' of validation - one to ensure the data conforms to the requirements of an underlying table, and another to ensure the data …

Software Development c#
Member Avatar for pilsdumps
0
547
Member Avatar for makachuki

hi , I wish to create buttons(kinda array of buttons) on a form everytime the form loads. I am not getting the code/syntaxes for the same. Its like that the no buttons and there attribute on the form changes dynamically according to the DB . Please some1 help me with …

Software Development c# engineering
Member Avatar for ddanbe
0
299
Member Avatar for noey699

I have been searching around the internet for a few questions I have on the List<T> class with no success. 1. how do you edit the last item in your list 2. how do you edit a specific items value, every time i do it says you cannot edit a …

Software Development
Member Avatar for noey699
0
94
Member Avatar for merse

I have a pair member data in a class: pair<double,double> memory; How can I change the firs or second element? If I simply write memory.first = 42 the compiler says read-only structure If I use memory = pair<double,double>(42,42) than: error passing 'this' argument I dont understand, please help me

Software Development c++ data-structure
Member Avatar for Galf
0
76
Member Avatar for jdpjtp910

Back again, with another homework problem that is stumping me. Ok so assignment is to design 3 classes: Ship, Cruise Ship, and Cargo Ship. Ship should: member variable for name of ship (string) member variable for year ship was built (string) constructor and accessors and mutators virtual print that displays …

Software Development c++
Member Avatar for lotrsimp12345
0
2K
Member Avatar for Kushal Thakkar

can anyone tell me the merits & demerits of friend functions? p.s. help me kushal

Software Development c++
Member Avatar for Dave Sinkula
0
2K
Member Avatar for wwsoft

hello , I need to know how to get the direction from point A to point B eg. point_direction(0 , 0 , 100,100); would equal 315 x1 y1 x2 y2 how do I compute this ? Thanks !

Software Development c++
Member Avatar for daviddoria
0
169
Member Avatar for Fbody

I'm in the process of reworking a bit field that I built to condense a collection of rule activation flags for a game I'm working on. I need to change the "multiplierRule" so that it can represent 2 different variations of the same rule as well as an "inactive" state. …

Software Development c++
Member Avatar for Dave Sinkula
0
378
Member Avatar for omgaga

Hello, Currently, i was assigned to create an array, which i have no idea what array is. The problem is this.... 2.Write a function to read in numbers and put them into the array. The function should continue to read in numbers until either: the user types a negative number, …

Software Development c++
Member Avatar for Fbody
0
92
Member Avatar for HelpMeIT

I am currently trying to get the text from a DBLookUpComboBox but it wont let me retrieve it i have a number and 2 strings in the box which is an ID and first and last name. I cannot retrieve anything from the box unless i use a edit box …

Software Development pascal
Member Avatar for fayyaz
0
527
Member Avatar for reza.adinata

Hi all, I am trying to learn the basic concept about array, however when I tried to change the type into string, it shows error .. I am using IDE visual studio 2005 [CODE]#include <iostream> #include <string> using namespace std; int main() { string stName[20]; cout << "what is your …

Software Development c++ ide visual-basic visual-studio
Member Avatar for reza.adinata
0
157
Member Avatar for john_prince

Hi, We've a requirement wherein we're provided with a csv file, within the file there is a name field, and some of names are very long and are causing issues while importing. What we want is pull out these kind of rows containing longer names and send it back to …

Software Development perl
Member Avatar for d5e5
0
95
Member Avatar for jaymeaux77

Hi there! I am working on a simple text based console application for a game of battleship. I am not really looking for a raw code just ideas on where to go next with my code. Some things i would like to put in it that I am flat out …

Software Development c
Member Avatar for jaymeaux77
0
4K
Member Avatar for pjrey

hello, i use a simple log script on my site.. very basic.. i would like to modify it, and am having issues.. here is what i would like... i would like to be able to have it filter out certian HOST names.. but not exact.. say for instance, i dont …

Software Development perl
Member Avatar for pjrey
0
269
Member Avatar for mirness

please help me.. i dunno how to make my project in C/C++. it's about binary trees but we'll use names instead of numbers or single chars then the traversals.. PLEASE... thanks!

Software Development c
Member Avatar for xavier666
0
53
Member Avatar for domingo

Hi i have a problem Error 1 Operator '<' cannot be applied to operands of type 'object' and 'System.TimeSpan'. to use timespan with < is there any type of code? [CODE] SqlCommand cmd = new SqlCommand("SELECT * FROM tblBooking", conn); SqlDataReader rdr = cmd.ExecuteReader(); DateTime ts = new DateTime(); TimeSpan …

Software Development
Member Avatar for kplcjl
0
197
Member Avatar for kooldba

I have some data like this: [CODE] 6 9 5 2 3 6 1 5 1 0 3 4 5 3 9 1 9 4 3 8 6 8 5 1 5 4 9 8 1 4 4 5 1 5 8 6 7 2 5 5 6 1 8 …

Software Development java
Member Avatar for javaAddict
0
119
Member Avatar for vijay K

how to create windows.h header file It is doesn't on my PC .Please give me windows.h header file

Software Development c++
Member Avatar for Ancient Dragon
0
92
Member Avatar for Alicito

Guys I'm having a problem which is really annoying me .. I'm trying to change a normal class into a template class, but every time I try to do that I get a bunch of problems with the object of that class and the template : let's say I have …

Software Development c++
Member Avatar for Alicito
0
99
Member Avatar for nuubee

Hi all, Ok, so I am new to C++ and whilst I understand most of the theory, I am still struggling with the practical applications! I'm trying to write a program that will allow a user to enter 10 whole numbers, then return the sum of all 10 numbers, the …

Software Development c++
Member Avatar for piyota
0
4K
Member Avatar for arpit_

I am trying to make a log reader , which will read the log ..and the user will input a search string .. i want to get the output in a excel file containing the whole line in which this string is found [CODE]try { FileReader fis = null; FileWriter …

Software Development java
Member Avatar for masijade
0
136
Member Avatar for Patrickero

I've got an XML: [CODE]<?xml version="1.0" standalone="yes"?> <root> <profile> <name>xyz</name> <salary1>4</salary1> <salary2>2</salary2> </profile> <profile> <name>mno</name> <salary1>8</salary1> <salary2>6</salary2> </profile> </root>[/CODE] and a XSLT: [CODE]<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" version="1.0"> <xsl:template match = "/" > <html> <head><title></title></head> <body> <br /> <table border="0"> <tr> <td class="headerClass">name</td> <td class="headerClass">salary1</td> <td class="headerClass">salary2</td> </tr> …

Software Development xml
Member Avatar for fpmurphy
0
104
Member Avatar for team_tip

a requirement was sent to me below: API should be in the form of static library. company xxx will link the library into a third party application to prevent any possible exposure of the code(dll) could they mean an import library? An import library is a library that automates the …

Software Development api c++ windows-api
Member Avatar for Ancient Dragon
0
119
Member Avatar for nikolabob

First i have to say that i'm have low exp in software development, so please have patience and understanding with me. Ok, my first commercial C# appl is almost done, so i wounder what should i have to do to protect it? In the way someone can't copy and use …

Software Development
Member Avatar for nikolabob
0
182
Member Avatar for LemonLemon

I want to convert the text string from a file into binary and then create a new file holding these binary. I am using the VC++ 2008. I have done some search on the internet, but hardly understand. Can anyone give me idea or sample code with explanation? Thanks in …

Software Development c++
Member Avatar for Ancient Dragon
0
98
Member Avatar for slade2627

How do you select a string in a list using its index count??

Software Development java
Member Avatar for abhay1234
0
94
Member Avatar for Swiftle

Hello, I'm writing a simple version of the message digest algorithm. In our version we get a string, translated to its decimal value. We need to tackle 8 characters per loop. I'm having problems with the implementation of the loop. I have a DD which stores the size of the …

Software Development algorithm assembly
Member Avatar for Swiftle
0
81
Member Avatar for TaSkOnE

Hi @ all, b4 things get serious. :icon_smile: Im using MFC with VCPP 6. I have a simple dialoge based app. Im using a triggered event with which I want to update the content of a CEdit box. The ASSERT of IsWindow fails because m_hWind = 0, I figure this …

Software Development c++ gui windows-api
Member Avatar for TaSkOnE
0
2K
Member Avatar for jeffery12109

can you guys please shorten this code for me... I need to do the same thing for all 8 potions [CODE]def fightItems(yourHp, yourHpMax, heartPotion, megaHeartPotion,bloodXHealer, duelBloodXXHealer,energyYPotion, rainbowBasicHealer, attackXXXPotion, defenceXXXPotion): while karidQuest1chooseFightOptiion == "2": print '1. Heart Potion(',heartPotion,'remaining)' time.sleep(0.5) print '2. Mega Heart Potion(' , megaHeartPotion ,'remaining)' time.sleep(0.5) print '3. Blood …

Software Development python
Member Avatar for jeffery12109
0
137
Member Avatar for Alpdog14

I have a java project that I need help on. The program is for word occurrences and I have a basic add() and frequency() methods I need help creating, not sure how to begin. here is the skeleton I am working with: [CODE]@Override public void add(final String word, final int …

Software Development java
Member Avatar for LReynolds
0
273
Member Avatar for ckjie

Hi all. I am doing a project with visual basic 2008, i'm using c++ windows form. i have a question about the code for this particular button, where i wan tis button click to be link to another folder. For example, when clicking this button [btnDownload], it will open the …

Software Development c++ visual-basic
Member Avatar for ckjie
0
151
Member Avatar for ctrl-alt-del

Good afternoon all! As is most often the case in this forum, I am faced with a problem I cannot seem to solve. I am trying to write a program that reads the state of the caps-lock key. If it is active I want it to display a picture on …

Software Development
Member Avatar for jonsca
0
108
Member Avatar for Malinka

Dear Community, hopefully someone can explain this to me in simple terms: I would like to store raw input from a User without waiting for him to press Enter. And would it be possible to still check if the response is one of the predefined options? My raw input consists …

Software Development python
Member Avatar for Malinka
0
2K
Member Avatar for BrandonB

Hi all, Im currently doing an assignment where we have been told to write a program to input 2 values (namely the area of wallspace to be painted & the price of the paint) & then output several other values based on the values input. At this point I'm writing …

Software Development c++ ios
Member Avatar for BrandonB
0
141
Member Avatar for MaxWildly

I am not getting the correct output for this method. I have looked at the BigInteger class, and even tried to implement, after rewriting for my instance variable, but it did not carry the numbers over to the next digit, or bring down the remainders. Thanks in advance. [CODE] public …

Software Development java
Member Avatar for gunjannigam
0
193

The End.