43,549 Solved Topics
Remove Filter ![]() | |
Hi all. This regards "Accelerated C++" Exercise 7-2. I'm trying to write a program that uses a map to put students grades into grade bands and print which band each student falls into. The grade bands are (A: 90-100, B: 80-89.99, C: 70-79.99, D: 60-69.99, F: <60). I'm getting into … Software Development c++ | |
[B]Hello all..[/B] is it possible to create my own simple programming language in c++? complete with the compiler,editor and the libraries.. just a basic model where i can write simple instructions,save it with my own extension and run atleast a few simple algorithms.. Software Development c++ | |
I am attempting to create a "dirty form" checking class based on an example found at codeproject. I am hung up on the first line of one of the classes public class ControlDirtyTrackerCollection: List<ControlDirtyTracker> I am unsure how to replicate that : List<> part in vb net. Thanks | |
Hello, I need a little help with the correct implementantion of the bisection search algorithm in the following exercise: - with 2 given variables, balance and annual interest rate, calculate the smallest monthly payment so that we can pay off the balance within a year test case: balance = 320000 … | |
**the code works perfectly, just i got something i dont understand...** i'v been trying to get a hold of recursion and sorting for about 3-4 days now, im getting some of it, but still not happy enough.. i searched for some good code for binary search and merge sort on … Software Development c mathematics seo | |
Hi im writing a program to simulate a slot machine, where a user enteres a coin and has a 70% chance of winning (say 3 coins). Anyways, I have a class slotMachine with a public int random() function. Here is the function: int slotMachine::random() { srand( time(NULL)); randomNum = rand() … Software Development c++ | |
I cant seem to find an answer to this issue. I am opening a form from a user control. I created some public write only properties on the user control, but I cant figure out how to create a reference to the original existing user control to interact with those … Software Development vb.net | |
I am trying to write a shell script but I only want it to run if there are no files with a specific name found on the server. I know how to check for a specif file which would be done like this: if [ -f /path/to/file ] then echo … Software Development shell-scripting | |
Hello everyone. I am in a programming fundamentals class which we are using python. I am working on a Lab problem and really am not 100% sure how to do it. The Problem: A shipping company (Fast Freight Shipping Company) wants a program that asks the user to enter the … Software Development python | |
I have two forms as form1 and form2 in my project.in form1 it has textbox as txtid. I take n=txtid.text in from1.then how can I use the same value of n (got at form1) applicable at from2. Software Development visual-basic | |
I can't seem to figure this out. The multidimensional array "structure" changes its values without any reason. I am using Visual Studio 2010 for debugging, and when it enters "structure[x][y] = readData" for the first time, it changes the array's value, but it changes back on next line. I don't … Software Development c++ visual-studio | |
I have a program that is supposed to match opening and closing braces. It's supposed to work like a stack. It works until the last line of the input file. The last line is matching, but because it thinks the array size is zero it drops out and states that … Software Development c++ file-stream | |
I need some help starting my project. You will have the following functions (no violation of these interfaces) and you may have others, as needed: − public static void GenerateRandomTriangles(int numTriangles) to create a file RandomTriangles.dat having the following format (including some comments like the ones shown below) with random … Software Development java | |
--->>> when i click the yes button me.show, disappears, it suppose to stay, i don't know that the problem is. I hope someone can help thanks in advanced ^_^ Public Class MagicBeans Private Sub MagicBeans_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MessageBox.Show("WELCOME TO MAGIC BEANS INC. ^_^ … Software Development vb.net | |
I'm trying to override equals method, but I'm getting error I have two classes one abstract and the inherited class. public abstract class MyData extends Object { public abstract boolean equals(MyData ohtherData); } public class IntData extends MyData { protected int num; public IntData (int n) { this.num = n; … Software Development java | |
Boolean eminem = new Boolean("yes"); What does it mean & what does it create? Thanks. Software Development java | |
Write a method setRating that reads a rating from the keyboard, insisting that the rating supplied by the user be valid. rating should be 1 to 5; public void setRating(){ System.out.println("enter rating "); int myRating = keyboard.nextInt(); } is this correct? or need to include like this public void setRating(){ … Software Development java | |
Hi, I have googled but found nothing about this. I am trying to generate a random number from a given array. But how do i do it? **Suppose:** I have an array `int arr[]={3,89,99,4,55};` and i want to generate a random number among these numbers. thanks in advance. Software Development c++ | |
Hi all, I came to know that in Java or c++, constructor is executed only after the allocation of space.... Then what does an implicit default constructor(in c++) or default constructor in Java does....? If we explicitly define our constructor then the initialization will be done according to our needs! … | |
I'm creating a jar file of my game to make it smaller and easier to transfer. I was able to created jar file out of my classes and include there images. Question is - how do I include txt file which is used for reading and writing? Software Development file-system java | |
Hi, I'm haveing trouble turing an array of Card objects into an ArrayList. The main reason I would like to use an array list is because I can then use the get/remove/add methods associated with an array list which is much harder to do with a normal java array. Heres … Software Development java | |
public string[] LandsKodComboBox(string[] dendei1, string[] dendei2) { string[] dendei1 = new string[5]; string[] dendei2 = new string[7]; //assign the array dendei1[2]="hello"; //etc etc.... return dendei1, dendei2; } why cant i return both of them? or how do you write? thank you Dendei. Software Development | |
I upload my test_maze.txt so you can see my problem. I have some 3 unwanted $ that went up and 1 unwanted $ that went down on my path on the maze from P to T. I think the problem is in line 20 in the def main(): of my … Software Development python | |
case 2: System.out.println(); ctr2=1; System.out.println("Select products and add to cart"); for(ctr=0;ctr<nList;ctr++) { System.out.println(ctr2 + ". " + itemArray[ctr] + " " + priceArray[ctr]); ctr2++; } System.out.println(); System.out.println("Enter the number of item you want to purchase: "); int itemPur = Integer.parseInt(a.readLine()); System.out.println("Choose the product you want to add to cart"); for(ctr1=0;ctr1<itemPur;ctr1++) … Software Development java | |
Hi, I'm having problems with line 37 in my Driver class. I know that I get that error because, according to Java, the variable Task, in the Driver, has not been initialized, but I do not see how I'm not initializing it. Thanks [CODE]import java.util.Scanner; import java.io.*; public class Driver … | |
Hi, i have a dataset with 2 columns. 1 column is in String datatype and another one is in Timespan. Now i want to generate a chart from the dataset. While i'm trying to generate the chart, it has error: *"Series data points do not support values of type System.TimeSpan … | |
I am in a Fundamentals of Programming class which we are using Python. In the book was a simple code to solve a problem where a cook knows in cups how much he needs but we are converting it to ounces. I was playing around with that and trying to … Software Development python | |
so i was trying to make a binary tree program. just inserting and deleteing. some how i messed up. i think insertion is ok till level 1 after that stays on level 1 only. also the function to delete the whole tree is not working. it only deletes node at … Software Development c++ data-structure perl | |
with a lil bit of change in code ,it's functioning, but I want it to function with data members being private :-/ #include<iostream.h> #include<conio.h> class account{ public: int account_number; float balance; int passw; public: void display() { cout<<"Account number is:"<<account_number<<endl<< "Account balance is:"<<balance<<endl; } void user(int acc, float amou, int … Software Development c++ | |
#include<stdio.h> #include<conio.h> void main() { int a[20],i; clrscr(); printf("enter 20 numbers: "); for(i=0;i<20;i++) scanf("%d",&a[i]); for(i=0;i<20;i++) printf("%d\n",a[i]); getch(); } Software Development c | |
Greetings! Just want to ask how to create a C/C++ ide then link to a compiler? any advice? can I use a visual studio for creating an IDE?... Thanks Best regards, glenndr_15 Software Development c c++ ide visual-studio | |
#include <stdio.h> #include <stdlib.h> #define MAXSIZE 6 int main(int argc, char** argv) { float stddeviation, deviation, sumsqr, variance, mean, x, t, m, sum=0, max, min; int numdatapts, k; FILE * inFile; inFile = fopen("Uniform93.data", "r"); if(inFile == NULL){ printf("\nError opening file. Abort program.\n"); exit(1); } for (k = 1; k … Software Development c | |
Hi. I'm having problems about my program. My program is something like a directory. It takes in values for different fields and stores it in a linked list in a sorted manner. It also allows the user to save the linked list contents to a text file. Everything runs okay … Software Development c file-system linked-list | |
I want to print the following using for loop. from the pattern, it's clear that when row and column is equal to each other it prints A that gives me A from top left to bottom right need clues A - A A - A A - A A-A ----A---- … Software Development c++ | |
I’m not sure why this isn’t working. Java isn’t giving me an error I have this in my StateController class public void insertLinks() { for(int index=0; //index is a local variable for state objects index < numStates; index++) //for loop to continue making state objects stopping at numStates(50) { myList.insertFirst(myStates[index]); … Software Development java linked-list | |
Hi, I'm concentrating on getting my card and deck classes for a card game project working correctly. Both my card and deck classes are working technically correct but when I go though my nested for loop in my Deck class to create a deck of cards it ends up being … Software Development java | |
Hello Everyone So i have this flowlayoutpanel that contains checkboxes, so what It does is if a select a checkbox the text of that checkbox will be passed to the ProblemTextBox  My main problem is that I am able to add new checkboxes to the ProblemTextBox, but when … Software Development vb.net | |
i want to add multiple rows in datagridview from textbox values then save the rows into database? how its possible...??? Software Development | |
package vc_client1; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.Socket; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; public class voiceReceiver { public Thread playThread; boolean stopCapture = false; static ByteArrayOutputStream byteArrayOutputStream; AudioFormat audioFormat; static TargetDataLine targetDataLine; AudioInputStream audioInputStream; BufferedOutputStream out = … Software Development java | |
Hello, I am working on a project which aims to compare an image to from a database of images and find out similar looking images. I am working with a DLL file which returns unique hash for each image. The hash is an array of 768 bytes. (byte[]) My problem … Software Development | |
I am new to Visual Basic 6 Class Modules and am having difficulty constructing a certain class. First off, I created a simple class, which is basically an array with some basic properties (Sum, etc). Next off, I want to create another class, which has these arrays as properties. As … Software Development visual-basic | |
so I have a 2D arry with defaul value 0, and what I want to do is to accept a value from a user to change 0s to 1s depending on the accepted value. for example: we have an arry like this 0000 0000 0000 0000 and the user enters … Software Development java | |
class Account { Long accNum, pwd} public class Banker { public static void main(String r[]) { new Banker().go(); // do more stuff } void go() { Account a1 = new Account(); a1.accNum = new Long("1024"); Account a2 = a1; Account a3 = a2; a3.pwd = a1.accNum.longValue(); a2.pwd = 4455L; } … Software Development java | |
<? super Animal> means animal or it's superclass only. Then why inside the method it's allowing to add Dog object even though it's a subclass of Animal? This program compiles and runs! import java.util.*; class Cat {} class Animal{Animal() {System.out.println("Animal constructor");}} class Dog extends Animal{Dog() {System.out.println("Dog constructor");}} public class GenericDemo5 … | |
Hello I am trying to allocate a dynamic array of length that the user inputs. I have a function to this for me but it doesn't allocate the number that I want it to allocate. For example, when I input one it gives me 7 digits... heres the code: int* … Software Development c++ | |
Hi. I'm fairly new to VB.NET programming, and i'm currently developing an application for the sake of experience. What i know about Visual Basic programming might be considered dangerous, but none the less, i'm trying. I'm having difficulty getting past the idea of how to update a record in a … Software Development dataset microsoft-access open-source vb.net visual-basic | |
overload resolution failed because no accessible 'new' can be called with these arguments.. the error shows at the Dim *dataadapter* As New SqlDataAdapter(sqlCmd, connection) Imports System.Data.SqlClient Public Class Form1 Private Sub BtnGenResult_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGenResult.Click Dim ConnectionString As String = "Data Source=(local)\SQLEXPRESS; AttachDbFilename=D:\PKBW Batching … Software Development dataset open-source vb.net | |
I am new to vb and I have been working on getting my brain around this if condition problem I am having in a windows forms in VB. This part of the project is a form writing back to SQL. I am looking to valdate input in textboxAm before I … Software Development vb.net | |
Hey all, can any one tell me the c# code to detect country from an IP address. Thanks in advance Software Development | |
Need help to print grids of letters ..for example ABABA BABAB ABABA BABAB ABABA BABAB so when row and column numbers are the same (r == c) the program prints an A. Any clue as to how I should approach this problem will be appreciated? this is what i got … Software Development c++ |
The End.