43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for C++ Beginner

Problem: Write a program that has an array of at least 20 integers. It should call a function that uses the linear search algoritm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program …

Software Development algorithm c++
Member Avatar for hag++
0
2K
Member Avatar for phil750

I have code that outputs data as so [code] Input file name: file.txt Input text: Process id 1, Quantum No 2, Priority 0 Process id 2, Quantum No 3, Priority 1 Process id 3, Quantum No 3, Priority 0 Process id 4, Quantum No 1, Priority 2 Start of processing …

Software Development c
0
89
Member Avatar for P00dle

I need help with jFilechooser. I've already made the jFilechooser. The problem is that I want to change the text of the "save" butten to "Ok", as I need it to perform a save function, as well as a read function, on different occasions. Changing the code where the jFilechooser …

Software Development gui java
Member Avatar for P00dle
0
173
Member Avatar for leeba

I want to read he source file of the .exe I am writing. For example if I am running test.exe I want to read test.c Also if the name of the file changes it still had to open it. what i have tried is: [code] FILE *fp=fopen(*.c,"r") [/code] Can someone …

Software Development c open-source
Member Avatar for leeba
0
675
Member Avatar for Israelsimba

Ladies and gentlemen i thank you for your assistance in my system that i have been developing. my organisation is very impressed by it. i was thinking of a situation whereby my system could give a notification when a person's copies he subscribed run out. i mean when the copies …

Software Development visual-basic
Member Avatar for Israelsimba
0
121
Member Avatar for DesperateDan

How can I correct. I have textbox that is empty and where the cursor is flashing and I wish to move to other textboxes. What happens is that the error message is displayed first and when I press OK, only then can I move to the other textboxes. How do …

Software Development vb.net
Member Avatar for DesperateDan
0
143
Member Avatar for mvujica

I am quite new to XSLT and I want to add unique index to elements types to transform something like this: <item1> [INDENT]<item2>[/INDENT] [INDENT][INDENT]<item3></item3>[/INDENT][/INDENT] [INDENT][INDENT]<item3></item3>[/INDENT][/INDENT] [INDENT]</item2>[/INDENT] [INDENT]<item2>[/INDENT] [INDENT][INDENT]<item3></item3>[/INDENT][/INDENT] [INDENT][INDENT]<item3></item3>[/INDENT][/INDENT] [INDENT]</item2>[/INDENT] </item1> <item1> </item1> into: <item1 id="1"> [INDENT]<item2 id="1">[/INDENT] [INDENT][INDENT]<item3 id="1"></item3>[/INDENT][/INDENT] [INDENT][INDENT]<item3 id="2"></item3>[/INDENT][/INDENT] [INDENT]</item2>[/INDENT] [INDENT]<item2 id="2">[/INDENT] [INDENT][INDENT]<item3 id="3"></item3>[/INDENT][/INDENT] [INDENT][INDENT]<item3 id="4"></item3>[/INDENT][/INDENT] [INDENT]</item2>[/INDENT] …

Software Development xml
Member Avatar for mvujica
0
102
Member Avatar for tizzo233

Hi. I am kind of having trouble with some functions. Basically, I know how to write out functions using void and no return, but for this problem I am working on, I have to use int myfunction(something&) instead of void myfunction(). Can anyone please lead me in the right direction …

Software Development c++ linked-list
Member Avatar for tizzo233
0
204
Member Avatar for Instinctlol

I was just wondering how I would compare 2 different object member of the same class. I want to compare the int speed between the 2 objects. Lets say I have a [CODE] class Car { private: int speed; public: int compare(Car car) } main() { Car Honda, Toyota; //Lets …

Software Development c++
Member Avatar for Instinctlol
0
137
Member Avatar for tizzo233

Hi. I am trying to input values from a user and put them in a linked list. Some how when I display the values that the user inputs, they are both show up under one variable. ie. user inputs $3 and then inputs $5 for next variable. however, when i …

Software Development c c# c++ linked-list
Member Avatar for thomas_naveen
0
109
Member Avatar for hitro456

Hi everyone I am executing a query on sqlreader object i.e. rdr = cmd.executereader(); now I get a value rdr[0] = 100; but this value is in reader object. I want to transfer that value rdr[0] to integer variable how can I do that? I tried int.parse, int.tryparse, convert.int32..etc it …

Software Development
Member Avatar for hitro456
0
148
Member Avatar for CaffeineCoder

Hey, I'm new to the Java arena, and am trying to create an application (using JForm and JPanel) displaying a fireworks show. The problem is creating an explosion for the display. Does anyone have any recommendations for creating an explosion? I've been stuck on this for quite some time and …

Software Development java
Member Avatar for cornmaster12
0
1K
Member Avatar for adams161

hi, I had a while loop in a run method, and in the while loop were a series of if stements. the series of if statments were in a try. my hope was if any if statement conked out it would catch the error, and continue the while loop ( …

Software Development java
Member Avatar for adams161
0
162
Member Avatar for Nautise

working on the backwards String and i can't get it to print correctly plz help [CODE] #include <iostream> using namespace std; void backward(char *); // Function prototype int main() { const int SIZE = 11; // Array size char string[SIZE]; // To hold a string // Ask the user to …

Software Development c++
Member Avatar for Nautise
0
128
Member Avatar for atjfriday2

Having the user “insert” their money. The money insertion will be handled in a Loop. For example, before they start, their total inserted is $0. let’s say that a drink costs $1.00. If they say that they are inserting “$0.25” then we will add $0.25 to $0 and tell them …

Software Development c++
Member Avatar for hag++
0
173
Member Avatar for Gibson_Junk

I have this code here from a previous topic that sknake help solve. I can't see why its not working. [CODE]String^ user = gcnew String(username->Text); String^ pass = gcnew String(password->Text); try { Uri^ url = gcnew Uri("http://beta.rapidpremium.net/login.php"); String^ data = "username=" + user + "&password=" + pass + "&login="; HttpWebRequest^ …

Software Development apache c++ xml
0
194
Member Avatar for phil750

I have an array, b[10]; i would like to add up all the values in that array and store the answer as wt. any help?

Software Development c
Member Avatar for mrnutty
0
97
Member Avatar for whitebread

I am trying to write a program that interfaces with a BlackBerry device plugged in via USB (utilizing the Desktop Manager API). The only exampes I can find for doing this are in C++, but I only know how to write/interpret VB .NET (I'm a novice, really), so I decided …

Software Development api asp.net c++ vb.net
Member Avatar for whitebread
0
210
Member Avatar for phil750

I have an array full of ints, the program prints out a line depends on the numbr of int e.g. if int is 8 it will print the line 8 times. And do this for all the ints stored in the array. this is my output: Start of processing ---> …

Software Development c
0
81
Member Avatar for Diamonddrake

Just because I was bored one day I looked on the net for an app that would let me use my RockBand ps3 drum kit on the PC. There was a fancy direct X app out that turned out to be very buggy, slow, and annoying to use. I set …

Software Development audio
Member Avatar for Diamonddrake
0
243
Member Avatar for Moonrise_state

Hi guys, this is probably a very basic question so excuse me for that. In java you can say: [CODE]Instance instance[] = new Instance[6] for (int i =0;i<6;i++){ instancei[i]=new Instance(...) [/CODE] Or basically declare lots of instances very quickly. In python is there an equivalent where I could write: [CODE] …

Software Development python
Member Avatar for vegaseat
0
126
Member Avatar for Agni

[code=c++] int main() { int i=10; char arr[i]; } [/code] I was expecting an error but it is compiling without any issues. I'm assuming the g++ compiler is doing something but not sure how to disable that. This is my compiler info [quote] Using built-in specs. Target: i486-linux-gnu Configured with: …

Software Development c++ ubuntu
Member Avatar for Agni
0
139
Member Avatar for donnyv

Hi, I am a total noob... I'm looking for a way to search a directory for config files and search each file for an entry that includes '1-' (bug apparently prepends this randomly) and delete that pesky 1- and save the file (on ubuntu). Any help or suggestions would be …

Software Development python ubuntu
Member Avatar for donnyv
0
114
Member Avatar for Mitja Bonca

I have dates and times stored in the database - the data type of DateTime (for example: 17.1.2010 16.23.34 - dd.MM.yyyy hh.mm.ss) The parameter which I define it has too look ONLY of date ("dd.MM.yyyy"), because I want to get all the values on a specific date and the sum …

Software Development
Member Avatar for Mitja Bonca
0
156
Member Avatar for DavidDD

Hello there! A very quick question: Can I use an already defined int as array size? I want to make an array the same length as a string. I use ifstream to read in a random word from a file and I use .length to get the length of it …

Software Development c++
Member Avatar for DavidDD
0
127
Member Avatar for Annettest

Hi everyone: I am fairly new to c++. I have created a dynamic array, but I am having trouble initializing it. My goal is to create a grid, and then assign an initial condition (for example, initial temperature = some value) on the grid points. I know that it would …

Software Development c++
Member Avatar for Annettest
0
178
Member Avatar for iamminsk

[CODE]//word frequency counter #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> struct words { char word[255]; int count; struct words *next; } *pointer, *start, *previous; int statistics(); int main(void) { statistics(); system("pause"); return 0; } int statistics() { FILE *fp; int pom,a; char quest[255]; start=NULL; fp=fopen(name, "r"); fscanf(fp, "%s", &quest); …

Software Development c c# c++ linked-list
Member Avatar for iamminsk
0
283
Member Avatar for anilopo

i want to add source files that i made in another computer to my project. i want them to be at the same folder as the project. how do i add them to the project? (to copy them into the folder wont help in this case..) thx!!

Software Development ide java
Member Avatar for anilopo
0
149
Member Avatar for gedas

hi guy i started learning c recently, and im trying to do exercises from the book the bad thing is they are not showing the solutions. what i need to do is simply modify the program below so that instead of reading single characters at a time, it reads in …

Software Development c
Member Avatar for mitrmkar
0
129
Member Avatar for sbanks_charles

I am writting an application in VB using VS2008 and SQL2005. I would like to save an array to my database and later retreive it. I understand that I need to serialize the array to do this but don't understand the process. I have looked at various resources on the …

Software Development vb.net
Member Avatar for sbanks_charles
0
1K
Member Avatar for dor.marchan

Hello All, I am in a roadblock right now and I really need some help on the code below. What I wanted to do is close all opened workbooks. This code does the work IF there is at least one or more opened workbooks. My problem is IF there is …

Software Development microsoft-office vb.net
Member Avatar for dor.marchan
0
196
Member Avatar for java..

how do manipulate byte array buffer .. i need its very urgent.. anybody give good example..

Software Development java
Member Avatar for musthafa.aj
0
107
Member Avatar for scias23

i've written this code, it works. whenever I click the OK button of the NewModel.vb, it will insert a new record, then the datasource of the datagridview will be reinstantiated and rebinded with all the records in the database. the datagridview will be rebinded with the records from the database. …

Software Development dataset vb.net
0
270
Member Avatar for neoeinstein

I am very new to C++ and have written only basic algorithms. In school we use turbo c++ compiler but now i have to attend a workshop for which I need to be able to use a gnu compiler and I do not know how to change my programs for …

Software Development c c++
Member Avatar for neoeinstein
4
684
Member Avatar for ankush.mukherje

[CODE]Private Sub cmdgetdata_Click() For i = 0 To lstsoftware.ListCount - 1 If lstsoftware.Selected(i) Then sSQL = "select * from Master_final" With adorsRAM .ActiveConnection = cn '.CursorLocation = adUseClient .CursorType = adOpenDynamic .LockType = adLockOptimistic .Open sSQL End With If Not adorsRAM.EOF Then Set msh.DataSource = adorsRAM msh.Refresh Else MsgBox "No …

Software Development visual-basic
Member Avatar for ankush.mukherje
0
514
Member Avatar for Web_Sailor

Hi... I want to read only the first line of a file and print the line. I don't want to read the whole file. How can I do that ? Here is how we normally read the file [CODE]import java.io.*; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.logging.Level; import java.util.logging.Logger; …

Software Development file-system java
Member Avatar for rAun007
0
8K
Member Avatar for Zaad

Hello; I am currently doing a project that involves the reading the data from a MS word document..... At present I am using the HWPFDocument library to read the text from the word document.... But I need a way to identify the [B]Title of the document when retreiving the data[/B]..... …

Software Development java
Member Avatar for Zaad
0
307
Member Avatar for scias23

i want to display the inserted row to my datagridview. how can i accomplish this? [CODE=vb] Imports System.Data.SqlClient Public Class Model Dim sqldata As SqlDataAdapter Dim modeldata As New DataSet Dim sqlquery As String Dim conn As New SqlConnection Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles …

Software Development dataset vb.net
Member Avatar for kvprajapati
0
112
Member Avatar for Stefano Mtangoo

/home/stefa/Projects/C++/evstevemd/Additions.h|7|error: expected class-name before ‘{’ token| /home/stefa/Projects/C++/evstevemd/Additions.h|9|error: expected ‘)’ before ‘parent’| ||=== Build finished: 2 errors, 0 warnings ===| Here is the file. Cpp file is empty. There is something wrong with My class and inheritance knowledge. What is wrong? thanks [CODE=C++]#ifndef ADDITIONS_H #define ADDITIONS_H #include <wx/panel.h> #include <wx/notebook.h> class …

Software Development c++
Member Avatar for Stefano Mtangoo
0
783
Member Avatar for JohnDove

My vb app uses an icon which is 128x128, which looks fine on the desktop. But when viewed in a folder with View set to Extra Large Icons its size doesn't change - it is too small (smaller than 128x128). Any ideas how I can rectify this?

Software Development vb.net
Member Avatar for kvprajapati
0
114
Member Avatar for ankush.mukherje

How can we add data from multiple columns of an access table in a list box. Please explain with the help of a code. Thanks in advance.

Software Development visual-basic
Member Avatar for ankush.mukherje
0
115
Member Avatar for death_oclock

I can't find, within my project directories, any option to specify where I want my .exe to start in. I want to do this for that sake of .dll and other file references. Any help?

Software Development c++
Member Avatar for jakesee
0
104
Member Avatar for goody11

Hey, I made a function that will automatically conjugate a Spanish verb and I want to put the different conjugations in different Edit Text controls but when I use SetDlgText it comes up with a bunch of i's with accents. Here is the code that I've narrowed it down to. …

Software Development c++
0
73
Member Avatar for ThomasII

Hello- I am trying to create a program that will allow a user to enter in checking or savings data; date, type of transaction (deposit or withdrawl), display the previous balance and the new balance based on the new transaction entered. I cannot figure out how to locate the element …

Software Development vb.net visual-studio
0
97
Member Avatar for fuston05

im asking w input() for user to input "spelling words" for a kids homework, and i want it to append or add the words entered into a list. i got it to ask for user input for the words, but not sure how to make it add them into a …

Software Development python
Member Avatar for fuston05
0
111
Member Avatar for wolfkrug

It is supposed to take a ceral box measurement in ounces and convert it to metric tons, as well as tell how many boxes it would take to equal a metric ton. Here it is. [CODE] #include <iostream> using namespace std; double ounces; cout << "Enter the box weight in …

Software Development c++
Member Avatar for wolfkrug
1
178
Member Avatar for instinctfx

After having a look at a few freeware components that support drop shadows (solid colours only) Does anyone know of a panel that supports drop shadowing that does not allow inner components when aligned to client to sit over the drop shadows ? or a way to get the panel …

Software Development pascal
0
79
Member Avatar for Jetsetivan

Hi everyone, This is my first post so go easy on me please :). I am trying to compile a simple program that takes two binary numbers and computes a third based on bit operations (i.e. C = A&B, C = A|B etc....) but I run into the "vector subscript …

Software Development c++
Member Avatar for Jetsetivan
0
200
Member Avatar for buzzykerbox

Hey,just have a problem with some code,just starting out Its basically a guessing game in vb [CODE] Public Class frmMain Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGuess.Click Dim randNum As Integer Dim guess As Integer = Convert.ToInt32(txtGuess.Text) Randomize() randNum = Int(20 * Rnd()) + 1 …

Software Development vb.net
Member Avatar for buzzykerbox
0
231
Member Avatar for Katsurou

Hi so I have the next problem (didnt write it in code yet because I dont know how i should start) I have to make a program in Visual Studio 2008 that would add words to numbers and make it a word again s ofor example: monday + 4 =friday …

Software Development c# visual-studio
Member Avatar for Katsurou
1
238

The End.