132,726 Archived Topics
Remove Filter ![]() | |
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 … | |
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++ | |
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++ | |
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 | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 … | |
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 … | |
just need some advice on making a list containing values for Tkinter buttons. thankyou :) | |
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++ | |
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 | |
![]() | 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# ![]() |
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 | |
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 | |
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 | |
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++ | |
can anyone tell me the merits & demerits of friend functions? p.s. help me kushal Software Development c++ | |
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++ | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
how to create windows.h header file It is doesn't on my PC .Please give me windows.h header file Software Development c++ | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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++ | |
How do you select a string in a list using its index count?? Software Development java | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 |
The End.