43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Dakot

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 …

Software Development c c# c++
Member Avatar for Narue
0
102
Member Avatar for limpek1991

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
Member Avatar for limpek1991
1
125
Member Avatar for kab5zb

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++
Member Avatar for thines01
0
191
Member Avatar for <HHH>

hello ! im trying to read few numbers from a file and but each line of numbers in diffrent array now i can read the numbers but in one array any help here is the code [CODE] public static void main(String[] args) throws IOException { File number = new File …

Software Development java
Member Avatar for <HHH>
0
106
Member Avatar for adobe71

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
Member Avatar for Antenka
0
237
Member Avatar for Despairy

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++
Member Avatar for jwenting
0
249
Member Avatar for StephNicolaou

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
Member Avatar for StephNicolaou
0
236
Member Avatar for angeriel1

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
Member Avatar for mKorbel
0
210
Member Avatar for jdm

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
Member Avatar for jdm
0
155
Member Avatar for codybuRr

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
Member Avatar for codybuRr
0
1K
Member Avatar for Zssffssz

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++
Member Avatar for Zssffssz
0
540
Member Avatar for da10x

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++
Member Avatar for da10x
0
131
Member Avatar for Zssffssz

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 …

Software Development c c++ gui
Member Avatar for mike_2000_17
0
327
Member Avatar for yurigagarin

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++
Member Avatar for yurigagarin
0
259
Member Avatar for renzlo

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 …

Software Development image vb.net
0
90
Member Avatar for xxunknown321

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++
Member Avatar for usustarr
0
8K
Member Avatar for Nandomo

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
Member Avatar for Nandomo
0
201
Member Avatar for Nandomo

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
Member Avatar for Nandomo
0
182
Member Avatar for thendrluca

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
Member Avatar for Adak
0
354
Member Avatar for lele07060

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
Member Avatar for JamesCherrill
0
527
Member Avatar for skywire_

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
Member Avatar for mKorbel
0
2K
Member Avatar for babyhuyx

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++
Member Avatar for babyhuyx
0
2K
Member Avatar for Erlendftw

Is there an actionMap-like thing for mouse clicks? Thank you in advance, ive tried google, but did not find anything :/

Software Development java
Member Avatar for Erlendftw
0
209
Member Avatar for tgreer

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
Member Avatar for tgreer
0
198
Member Avatar for superjj

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
Member Avatar for superjj
0
197
Member Avatar for lele07060

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
Member Avatar for JeffGrigg
0
83
Member Avatar for myk45

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 …

Software Development c++ ide
Member Avatar for myk45
0
917
Member Avatar for technopup

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
Member Avatar for technopup
0
126
Member Avatar for chuyauchi

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++
Member Avatar for chuyauchi
0
1K
Member Avatar for iThaos

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
Member Avatar for iThaos
0
148
Member Avatar for chuyauchi

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++
Member Avatar for chuyauchi
0
124
Member Avatar for midgarsorm

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
Member Avatar for midgarsorm
0
112
Member Avatar for normanallen

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
Member Avatar for normanallen
0
193
Member Avatar for grh1107

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
Member Avatar for vijayan121
0
224
Member Avatar for tallygal

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
Member Avatar for tallygal
0
232
Member Avatar for shenanigans902

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
Member Avatar for thines01
0
1K
Member Avatar for MeSam0804

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
Member Avatar for MeSam0804
0
316
Member Avatar for Kerok

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
Member Avatar for Kerok
0
979
Member Avatar for mehnihma

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
Member Avatar for stultuske
0
125
Member Avatar for just_starting

[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
Member Avatar for just_starting
0
167
Member Avatar for haoth

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
Member Avatar for haoth
0
371
Member Avatar for nerkla

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
Member Avatar for nerkla
0
146
Member Avatar for cdea06

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
Member Avatar for JamesCherrill
0
244
Member Avatar for zack_falcon

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
Member Avatar for zack_falcon
0
145
Member Avatar for loupgarou

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
Member Avatar for JamesCherrill
0
204
Member Avatar for dennysimon

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
Member Avatar for rajesh.ingole
0
85
Member Avatar for logicmonster

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
Member Avatar for JamesCherrill
0
778
Member Avatar for Joey_Brown

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
Member Avatar for Joey_Brown
0
3K
Member Avatar for Liuhh00

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
Member Avatar for timetraveller92
0
359
Member Avatar for dre-logics

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
Member Avatar for SamR44
0
5K

The End.