43,549 Solved Topics
Remove Filter ![]() | |
Hello all , i have a small problem , i'm writing now a voting program , and i'm a little bit confused , how can i attribute the votes to a certain person? i mean , i enter the value 1 , and this vote must go to the first … | |
Hi there. This is actually one of my assignment and i am having problem with the do while sentinel looping. The result i get is totally inverse from the one i expected. The system is supposingly ended when user enter 0, but it ended when user enter any value but … Software Development java | |
I was wondering if someone could help me write the code for this... I have a text file with 10 lines, one word on each line and I am trying to get a word from a random line and then cout that word. Can anyone help? Software Development c++ | |
How to replace '/' to '//' in database path,after selecting it from openfiledialog() control. From [CODE]OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:[B]\[/B]Documents[B]\[/B]Visual Studio 2008[B]\[/B]WebSites[B]\[/B]myproject[B]\[/B]db[B]\[/B]mobile.mdb");[/CODE] To [CODE]OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:[B]\\[/B]Documents[B]\\[/B]Visual Studio 2008[B]\\[/B]WebSites[B]\\[/B]myproject[B]\\[/B]db[B]\\[/B]mobile.mdb");[/CODE] using button click Software Development visual-studio | |
after vising cplusplus site and checking my book i havent found any example or explanation... so here it is: i have a function called "string stringreturn()" now inside i have INT LIFE , and INT NUM i would like to return the following "blabla bla (INT LIFE VALUE) bla bla … Software Development c++ | |
Hey guys, I have an Jlabel class and trying to simply add it to the panel in my main class. However is nowhere to be seen! No errors are being output so currently have no idea what wrong...unless you can see whether my method is wrong... Jlabel class: [code] public … Software Development java | |
I have the folowing code so far which outputs the make and price of a car,but i cant seem to figure out were to add the discritpion of the car so that it can also be diplayed.HELP! i tried adding discription[k] = st.nextToken(); but the program did not run. [ICODE]import … Software Development java java-swing | |
I'm working on a program to get the reduce form of a fraction by finding the gcd of the fraction. It works for some while for others it doesn't work. I noticed it when I tried entering in -7, 6, 6, 2 for the numbers. The reduce form of the … Software Development assembly | |
Hey All! New to here, but I have a couple questions: How do I find Average word length, and how to I printout the occurrence of each word size? Needs to look like this: [CODE]length frequency ------ --------- 1 3 2 13 3 24 4 13 5 10 6 2 … Software Development java | |
Here's me error:"invalid conversion from 'char*' to 'char'. This is much different than what I found on google because I'm using actual pointers not return values n' stuff. Well heres a watered down version of the code: [CODE]char* LOCK = new char[501]; char ret[501] = "this is fine in program"; … Software Development c++ | |
Hi. I am currently writing a block of code to loop through a vector and generate all possible moves on a game. For my first for loop, this block of code never increments x. I even stuck an x = x+1 at the end of the block and it just … Software Development c++ | |
Well I want to make a DLL but all of the tutorials online seem to focus tword GUI programing or go a little too fast. Can anyone explain it? As far as I have seen it's syntax resembles resource files. And what makes it a '[I]Dynamic[/I] Link Libray' as in … | |
I tried to scan a text file ( contains decimal numbers) and save all the numbers into 1 array input1[50]. When I ran the code, the printout is always 1.0000 eventhough my text file have a bunch of numbers. Could somebody point out where I did wrong? Thank you. [CODE]VOID … Software Development c++ | |
Hi guys, this must be a newbie question for you but I am just a beginner in .net, I would like to ask for a guide or point me into on how to make a simple image viewer, my image is a tif/tiff file, I just want to select the … | |
How do i get my program to read the last ten lines of the ".txt" file? Can you please dumb it down as much as possible. Here is what i have so far: // reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () … Software Development c++ | |
I am writing a program that gives and grades a test. Currently I am working on reading in the text from a file to administer the test, but am running into limitations. So I have a couple of questions. Is there any way I can read in a segment of … Software Development java | |
I made an arraylist of objects which contain a question and an answer... How can I display just the question? Sooooo confused. Tutorials or anything will help, thanks in advance. [CODE] /* text file */ T Which Java keyword is used to define a subclass? extends S What is the … Software Development java | |
![]() | Hello World! i wrote this code for fliping the array , but it doesn't work ... why can anyone say me ? what i did wrong? [B]array[/B] and [B]i,n[/B] variable are already global declared. [CODE] void exb(void) { int aux; for(i=0;i<(n-1)/2;i++) { aux=x[i]; x[i]=x[n-1-i]; x[n-1-i]=aux; } } [/CODE] thanks :) Software Development c |
can someone help me and tell me what is wrong, I can't figure it out. This is what it is exactly saying Lab424.java:14: cannot find symbol symbol : method printf(java.lang.String, float) location: class Lab424 printf(" sum %f\n", sum); it is pointing to the "p" [CODE]import java.util.Scanner; public class Lab424 { … Software Development java | |
Hello, I was tasked to make a program that reads data from a text file and then place it into a JTable. I managed to read the file and split the strings but I don't know how to put the strings into a format accepted by JTable. Please help. This … Software Development java java-swing | |
I'm trying to compare a string value, defined by user input, to values in a struct, so it will print out the names associated with that value. [CODE] #include <iostream> #include <string> #include <sstream> using namespace std; #define n_fencers 5 struct Fencer { string name; string weapon; int score; int … Software Development c++ | |
Is there an actionMap-like thing for mouse clicks? Thank you in advance, ive tried google, but did not find anything :/ Software Development java | |
I have a C# Class Library which I want to use as a COM object in VBScript. I'm using Visual Studio C# 2010 Express. Here's the class code: [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace PB_GUID { class PB_GUID_Encode { private Guid _myGuid; private string … Software Development assembly vbscript visual-studio | |
hi I get an error, "has the wrong return type". it has something to do with "tim1.Tick += new System.EventHandler(tim1_tick);" Help me please. [CODE] Timer tim1 = new Timer(); DateTime huidigetijd = new DateTime(); private bool CheckTim1Start; public Wekker() { tim1.Tick += new System.EventHandler(tim1_tick); // tim1.Enabled = true; enable == … Software Development | |
can someone help me and tell me what is wrong, I can't figure it out. It is pointing to the line "public class Lab4.24" [CODE]import java.util.Scanner; public class Lab4.24 { public static void main(String[] args) { int i; float sum; i=3; sum=0; while(i<=99) { sum=sum + ( (i-2)/i); i=i+2; } … Software Development java | |
Hello all, I am a little confused about .lib and .dll files. I always thought that .lib files refer to a static library and that a .dll is the dynamic library. Recently, i read that .lib files also act as a stub for a .dll and that the .lib files … | |
Hello, I need to return the areas connected with the town placeid attribute of an XML document. The town placeid is a variable equal to a current page variable $x. e.g. xpath("/country/city/town[@placeid=$x]"); How can I return the areas for each using simpleXML/XPATH? <country> <city> <town placeid="" /> <areas> <area>A</area> <area>B</area> … Software Development xml | |
This program is to enter the scores, get the grades, and display the result. However, I get a [U][B]fatal error LNK1120: 1 unresolved externals[/B][/U] Does anyone know how to solve this problem? [CODE] #include <iostream> #include <iomanip> using namespace std; // Function prototype void letter(double score, double resultNum, char grade); … Software Development c++ | |
Hello fellow developers, Let me just start by saying I have had an abnormal start to developing. I started first with HTML > PHP > Java. I don't have much experience with Java but I feel quite confident in making PHP applications. I have already searched the forums but nobody … Software Development android-development java php | |
I have difficulty to change the following program by using the array. The display need to be like the following: [INDENT]Result 1: 50.00 Grade U Result 2: 95.60 Grade A Result 3: 72.00 Grade B[/INDENT] Can anyone tell me how to do it? Thanks. [CODE] #include <iostream> #include <iomanip> using … Software Development c++ | |
Hello I'm using visual studio I need help making a program where a txt file will be read. my program should read all the test scores in the line and will stop when -1 is entered example input file joshua 90 89 -1 michael 76 80 89 -1 Shawn 78 … Software Development c++ visual-studio | |
I have been using Visual Studio C++ 2010 Express to do some work, which has now succeeded after a lot of trouble. I wanted to go one step further but it seemed that I would need the full 2010 .NET software to achieve this. I downloaded Microsoft Visual Studio 2010, … Software Development c++ visual-studio | |
Hey, Im having trouble writing a function that will take a limited running average from a file. the running average works just fine, its just when i try to limit the input, i just come out to inf. could it possibly be that im using a static double for the … Software Development c++ mathematics | |
Here is what I have to do. this code needs to be modified to be able to enable the user to select a file in which to store grades. The application should allow the user to write any number of grades into that file and it should write one grade … Software Development file-system vb.net | |
Hi, I keep getting the error message "Missing return statement" after my if else controls. I have return controls, I'm just not sure if I can implement multiple returns. For example, I am trying to create a method in which the middle value of a sequence of numbers is returned, … Software Development java programming-construct | |
hi, I wanted to get the directories in a specific path and I wrote that by threading programming but when I call [CODE]waithandle.waitall(mywaithandles)[/CODE] , I get the unhandled exception of type 'System.ArgumentNullException' occurred in mscorlib.dll Additional information: Value cannot be null. error. Can anyone help me what to do ? … Software Development vb.net | |
I need to write a program where the user input their name, the program will tell them 'Hello,' and then show the user's name backwards. This is what I have: [CODE]INCLUDE Irvine32.inc .data pleaseEnter BYTE 'Please enter your name: ', 0 StringName BYTE 30 DUP(0) yourName BYTE 'Hello, ', 0 … Software Development assembly | |
![]() | I don't know what am I doing wrong, When I input number of courses it won't loop again just once? What is wrong with the code? Thanks [CODE] // EX 3 import java.util.*; // program uses class Scanner public class ComputeGpa { public static void main(String args[]) { // create … Software Development java |
[CODE]def main(): distance, fuel = 0.0, 0.0 inStr = input ("Enter gallons and miles (with a space between):") while inStr != "": gallons,miles = inStr.split() gallons = eval(gallons) miles = eval(miles) print("MPG for this leg: {0:0.1f}".format(miles/gallons)) distance = distance + miles fuel = fuel + gallons inStr = input("Enter gallons … Software Development python | |
Hi, I am having a bit of trouble finding a way to check a string for the highest and lowest number. Example: I would have a: [CODE]String example = "1 3 5 9 4 3";[/CODE] And now I would have to check which is the lowest number and the highest … Software Development java | |
Hi, My combobox is filled with file names (without extension) of all the .txt files in folder "[I]c:/files[/I]". When I select one file name from that combobox, how can I show that files full path in textbox or label? Sorry for my bad english... Software Development vb.net | |
Ok this is driving me absolutely crary! I'm trying to add a static method Account consolidate(Account acct1, Account acct2) to my Account class that creates a new account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. The new account should be … Software Development java | |
My professor has instructed me to make a simple project that requires the use of a database server on one computer, so that another can connect to it. If my program makes a change in the database, the other program is updated automatically. As in, it is updated as soon … Software Development | |
Hey everyone, I have a quick question about some Java code. I need to write a method that fills an array, with a few conditions. The method I'm writing is called readArray. There are [U]two[/U] arrays, one called "states" and the other "capitals". I have to fill both these String … Software Development java | |
hello all i just learn java syntax to extrac jar file we command : jar xf jar-file but there no information where the extracted files will be located and what is the sign if the command successfull or not any info ? thank denny Software Development java | |
I am trying to create an array of a custom object and I think the error I'm running into is that the objects within the array are not initialized prior to use (its a run time error, so i'm not entirely sure). The part that doesn't make sense is, if … Software Development java | |
Hello. What is the best way [an a correct one] to check a value, lets say I need a user input in a certain range. Could I place this check inside a setter method? My setter would than be a boolean return type instead of void? Are there some "laws" … Software Development java | |
hey guys lol to be honest...i just got this based off of luck x.x idk how but i can't keep doing this with the rest of my programs lol this is a program for an asterick pattern any way i can improve it just by using for loops?please im open … Software Development c | |
I have a simple question. [COLOR="Green"]Do while loop[/COLOR] to check each record in a MySQL Table, see code [COLOR="Red"] But i want certainly not just want not use recordset or MySqlDataReader.[/COLOR] I Is that possible? Information: I use Visual Basic 8.0 and Mysql 5.0 I have one table: Articles Article … Software Development open-source vb.net visual-basic |
The End.