132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jogieglenmait

i know that its so easy. but i dont know how to do it. ive tried ifstream and ofstream to add a line in a text file. and im sure someone in the past may have already posted this kind of problem. can anyone give me a link to that …

Software Development c++
Member Avatar for jogieglenmait
0
127
Member Avatar for swathys

hi, i have use below code to make sure the listview only contain 3 record n if more than 3 records to prompt error message and disable the NEXT TRANSACTION button. it works well. But the problem is when i delete 1 record out of 3 it suppose enable the …

Software Development listview vb.net
Member Avatar for swathys
0
347
Member Avatar for rob3097

Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given Object as a Number at java.text.DecimalFormat.format(DecimalFormat.java:487) at java.text.Format.format(Format.java:140) at McVrideMortgageCalculator.Main.main(Main.java:69) The above statement is the error that occurs when running code. [CODE]package McVrideMortgageCalculator; import java.text.*; //Allows text formatting and used for formatting currency in this program public class Main { public static …

Software Development java
Member Avatar for hmho
0
141
Member Avatar for malvi

Hello, I am working with rs232, and i have to write program in visual c++ which reads continous data from rs232. For that first i need to open available com ports from pc. I have COM3 in my pc, but i have to write com3 manually in my program. Is …

Software Development c++
Member Avatar for peteratoce
0
3K
Member Avatar for Morbane

I have a basic knowledge of C++ but mostly in a limited fashion. I am building an API and I need to send the resulting string to a text box in a Modal Dialog. I will not need to manipulate the string beyond sending it to the text box. The …

Software Development api c++
Member Avatar for Morbane
0
2K
Member Avatar for vivek nandan

I wrote the following code for testing the functionality of malloc() . The Code is compiled using GCC and executed with no errors. #include<stdio.h> #include<stdlib.h> int main(void) { char *str; str=(char*)malloc(4*sizeof(char)); printf("Enter string"); gets(str); if(sizeof(str)>4*sizeof(char)) {printf("Out of Memory"); free(str); str=NULL; } else{ printf("\nsring entered=\n"); while(*str) { printf("%c",*str); str++; } free(str); …

Software Development c
Member Avatar for Banfa
0
115
Member Avatar for ramosemman

my code should expand the binomial from second to the tenth power using looping, conditional, array statements cprogram. I must input the value of a and the value of b in the binomial: ( ax +b ) example : input: (1x+2) output: (x^2 + 4x +4) help me please.

Software Development c
Member Avatar for ramosemman
0
100
Member Avatar for flynismo

Hey guys, Sorry if this is in the wrong section, couldn't find a section for working on batch files. Anyway, here's my problem. I've made a firefox theme, and am distributing it. In order for the theme to work properly, the user needs to copy two files into a directory …

Software Development shell-scripting
Member Avatar for ~s.o.s~
0
135
Member Avatar for MikexDetroit

Hey all, I've spent the last couple hours looking at other posts with the same error and have still yet to figure out what is wrong. I'm just learning C++, I have a bit of experience with Python but, still just getting my feet wet. Here is the code. [CODE] …

Software Development c++
Member Avatar for MikexDetroit
0
961
Member Avatar for ilaref

Good day everyone! I'm currently working on a project and i need to open a text file and read a specific word. As of now, i already know how to open a text file but my problem is i don't know how to read a specific word in a text …

Software Development asp.net file-system
Member Avatar for sundarchum
0
614
Member Avatar for Intrade

I followed this guide for VC++ 2010, [url]http://msdn.microsoft.com/en-us/library/ms235636.aspx[/url] and apparently I either have a missing module/component or I did something wrong. I followed everything smoothly up until step 6-- "6. To build the project into a DLL, from the Project menu, select MathFuncsDllProperties…. On the left pane, under Configuration Properties, …

Software Development c++ ide visual-studio
Member Avatar for Intrade
0
272
Member Avatar for chris evans

Hi guys, Im learning VB.NET and as a first task im creating a login form. ive been trying to link it to another form once a correct username and password are entered. however, despite that i still cant be able to hide it or unload it once the next form …

Software Development vb.net
Member Avatar for chris evans
0
138
Member Avatar for knan

I have 2 lists X=['a'] Y=['b','c','d','e','f'] I need to make a new list Z such that, Z = ['ab','ac','ad','ae','af'] I know this uses simple concatenation. I tried several times but without success. I am a beginner so please help me with the code. Thanks in advance.

Software Development python
Member Avatar for Gribouillis
0
115
Member Avatar for srinivasan106

[CODE] for(i=0;i<n-1;i++) { for(j=i+1;j<n;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; count++; } } } [/CODE] [CODE] void select(int a[],int n) { for(i=0;i<=n;i++) { k=i; min=a[i]; for(j=i+1;j<=n-1;j++) { if(a[j]<min) { min=a[j]; k=j; count++; } else count++; } a[k]=a[i]; a[i]=min; } } [/CODE] which one is selection sort???first or sec??

Software Development c
Member Avatar for localinternet
0
327
Member Avatar for compedium

Private Sub CreateChart() Dim time2, tp As String Try Dim sr2 As New StreamReader("D:\Temp\datalogger\" & date1.ToString & "\int_sma_" + date1.ToString + ".txt") Dim line7 = sr2.ReadLine Dim tn = timeNow() Do While Not line7 Is Nothing 'loop until end of file If IsNumeric(line7.Chars(0)) Then If Directory.Exists("D:\Temp\datalogger\" & date1) Then If …

Software Development vb.net
Member Avatar for compedium
0
104
Member Avatar for limergal

Hi, I have a code, but I don't get what I'm doing wrong, can you please help me with this Write a switch statement that tests the value of the char variable response and performs the following actions: if response is y , the message Your request is being processed …

Software Development c++
Member Avatar for bhemz11
0
569
Member Avatar for Kapilxcb

hey dudes pls help me on this. My program is crashing on the following piece of code When i make 1 recurssive function to work, the program works without crashing. So I would really need help in spotting the mistake I have done. Incase if you want to know what …

Software Development c
Member Avatar for Kapilxcb
0
122
Member Avatar for deepak_1706

In my Forms application i tried to resize a pictureBox control during runtime and it seems to give some trouble. There is scale factor scalex , scaley which i applied to the width and height property of the control. [CODE] tempw = 980.0f; temph = 130.0f; tempw = float.Parse(pictureBox1.Width.ToString()); temph …

Software Development
Member Avatar for deepak_1706
0
138
Member Avatar for mannuel1021

[CODE]#include<iostream> void selectsort(int*,int*);//function prototype int *smallest(int*,int*);//function prototype void exchange(int*,int*);//function prototype void printlist(int*,int*);//function prototype using namespace std; void main() //this will ask the user to give five integers inside the array and will display it { int *name; const int size=5; int size2=5; name = &size2; int ary[size]; int *plast; plast …

Software Development c++
Member Avatar for csurfer
0
195
Member Avatar for burcin erek

this program is trying to add from 1.. to x with return function. but when I enter 10 sum is 54 which is wrong. 1,2,3,4,5,6,7,8,9,10 = 55 [CODE]#include <cstdlib> #include <iostream> int burcin(int); using namespace std; int main(int argc, char *argv[]) { int x; int ft=0; cout << "enter the …

Software Development c++
Member Avatar for burcin erek
0
106
Member Avatar for baltair

Hello, I am trying to create a shop where the user can pick an item to add to their cart and after they pick the item, I want to remove it from the list, but I can't seem to remember on how to do it. [CODE] int main( void ) …

Software Development c++ queue
Member Avatar for baltair
0
103
Member Avatar for jcfans

wen i press the enter key,i can login.But i face a problem which is there will repeat call the login function when i press enter key a fews times and there got error! how can i make the enter key is disable after i success login? thnaks [CODE] Private Sub …

Software Development gui vb.net
Member Avatar for jcfans
0
161
Member Avatar for musikluver4

I would like to be able to divide this java code up into more than one file, so I can reuse the code for other programs, but I'm not sure what I can grab. Right now, I can't make another program using this code, as you see the WHOLE program …

Software Development java java-swing window-manager
Member Avatar for musikluver4
0
171
Member Avatar for Christ1m

The book Im using. Pg 108 - 124 Objects Abstraction, Data Structures and Design using C++ Author: Elliot Koffman and Paul Wolfgang I copied the example from the book, but the code is not working. I got a lot of errors in Phone_Directory.cpp. I dont know what to do [CODE] …

Software Development c++
Member Avatar for Intrade
0
264
Member Avatar for dinesh.isuranga

how to bind a double property to text box in C#..

Software Development
Member Avatar for dinesh.isuranga
0
97
Member Avatar for YingKang

I keep getting compiler errors. Could anyone help please? Thanks This is the error message: F:\DPR226\Homework\Student\main.cpp In function `int main(int, char**)': 39 F:\DPR226\Homework\Student\main.cpp invalid conversion from `int' to `int*' 39 F:\DPR226\Homework\Student\main.cpp initializing argument 4 of `void Student::setStudent(std::string, std::string, std::string, int*)' F:\DPR226\Homework\Student\Makefile.win [Build Error] [main.o] Error 1 [code] // main.cpp #include …

Software Development c++
Member Avatar for vidit_X
0
121
Member Avatar for Ferny84

I'm having problems with this c++ program. I need to read a file containing years on each line, and determine if the year is a leap year. The isLeap function looks fine, i'm just having problems actually reading the file and implementing the function. Can anyone help me out? [CODE]#include …

Software Development c++
Member Avatar for Ferny84
0
134
Member Avatar for power_computer

Hello all, I am given a project and would like some help/guidance from the community. I am not asking for any code just a direction and little advice on how to approach this project or how these things work per-say. I am behind in my classes due to me having …

Software Development algorithm c++ data-structure
Member Avatar for VernonDozier
0
1K
Member Avatar for baby_c

I have declared a global variable. But when i assign the "i" in the loop as the function parameter, the global variable does not chang. It seems that it creats another variable "i" and assigns it to that "i". Is it possible once i have declared the global "i"?? I'm …

Software Development c
Member Avatar for baby_c
0
80
Member Avatar for notuserfriendly

I am reading from a file and while i know how to work with those i am trying to read the line. get all the fields. then store them in a class with those fields. then store that object in a vector. Heres how i deal with reading the stuff …

Software Development java
Member Avatar for notuserfriendly
0
149
Member Avatar for Ultralisk

Hi I've been pulling my hair out over this program. It is uses a Class for creating objects to be used in an ordering tracking system. I'm having problems calling the objects and implementing them. I'm trying to follow a structure along these lines When an order is created payment …

Software Development python
Member Avatar for Ultralisk
0
160
Member Avatar for NV43

I'm having a problem being cause by what I believe to be my getMonthValue function which is resulting in my output always being "Saturday." Can anyone give me any reason this is happening? Thanks. [CODE]#include <iostream> #include <string> using namespace std; bool isLeapYear (int year); int getCenturyValue (int year); int …

Software Development c++
Member Avatar for goldzero
0
132
Member Avatar for simmyhp

Hi, Friends! I am doing my last year term project that needs me to use C and write a sudoku game. However, I don't know how to write the check part, can some of you help me a bit? Here is my code: [CODE]#include<stdio.h> #include<stdlib.h> #include<time.h> int x,y; int matrix[9][9], …

Software Development c puzzle
Member Avatar for Adak
0
606
Member Avatar for Invecta

Hello everybody, i make a simple calculator with C. When I compile it, the compiler didn't show error but when I run my program the result is wrong... This is my code: [CODE=c] //////////////////////////////////////////////// // Calculator // // Crated by : Invecta // // Thanks to all members of komunitas-bsi.com …

Software Development c
Member Avatar for Invecta
0
239
Member Avatar for jems5

Why does parsing a float into array cause precision loss error. I am trying to sort data from a text file that contains text, integers and float numbers. Using the for statement causes loss of precision errors. How do I correct this please. [CODE] float y; for (float k = …

Software Development java
Member Avatar for BestJewSinceJC
0
123
Member Avatar for Fadam360

Hello all, i have a homework lab/assignment due by 12 tonight. It needs to print out a drawing panel and request 2 names from the user. It should then have a way to take the 2 names entered and create 2 new names in the drawing panel: e.i. "John" would …

Software Development java
Member Avatar for Fadam360
0
195
Member Avatar for whimsical1987

Hi, I am getting seg fault when trying to run the code. I don't understand where I made a silly mistake. Can someone help me out please [code] #include<stdio.h> #include<string.h> void xstrcpy(char *, char *); int main() { char *a = "Hello World"; char *p; xstrcpy(a, p); return 0; } …

Software Development c
Member Avatar for whimsical1987
0
2K
Member Avatar for bookworm619

I am having problem with calculating the angle using sin. So far, I got the literal of numbers, which is not making sense. I am supposed to match my answers with this: Set up new triangle with coordinates (0.0, 0.0), (3.0, 0.0), (3.0, 4.0) Area: 6.0 Parimeter: 12.0 Length side …

Software Development java java-swing
Member Avatar for tong1
0
158
Member Avatar for Yutxz

I received the error "possible loss of precision" on the last line of my code. Is it not possible to return a double? My instructions were to create a program, called power, that took a double (x) and raised it to an integer (n) power. [CODE] package power; /** * …

Software Development java
Member Avatar for Yutxz
0
197
Member Avatar for grunge man

Im making a calculator Program to start off on visual basic. I got it to work with MsgBox, but now I'm trying to get it to work with the Print. MsgBox Example [CODE]Public Class Form1 Private Sub Button1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseClick Dim Pizza As …

Software Development vb.net visual-basic
Member Avatar for grunge man
0
137
Member Avatar for jigglymig1

why does this produce compile-time error? [CODE]int [] a = new int[10]; foreach(int val in a) { val=0; )[/CODE]

Software Development
Member Avatar for Momerath
0
105
Member Avatar for jtxay

Okay well i'm having trouble understanding this program ..in which our professor doesn't even explain..I'm so lost.. I hope somebody can help me please.. here's the problem... I have to write a program in c++ that computes the number of days between two dates using the Julian day number which …

Software Development algorithm c++
Member Avatar for Akill10
0
263
Member Avatar for bigwhiteegg

for some reason the following function has return numbers of error such as 1. new types may not be defined in a return type 2. two or more data types in declaration of `initialize' 3. ambiguates old declaration `GrowableArray initialize(GrowableArray&)' [CODE]void initialize(GrowableArray &a) { unsigned zero=0; a.elements=zero; a.element=NULL; }[/CODE] and …

Software Development c++
Member Avatar for bigwhiteegg
0
3K
Member Avatar for nwalser

Ok so I have to write a reverse method of a stack and I am not quite sure how to do it. I understand that i need to pop the strings from one stack into another but whenever I try to do this errors arise. Specifically it says it cannot …

Software Development java
Member Avatar for cale.macdonald
0
835
Member Avatar for baldturtle

When i try to complile it says SlotMachineReel.java:175: missing return statement I think its because all my returns are in "if" statements and it needs a default return. line 128 & line 175 Thanks in advance for any help [CODE]/** * Constructs a new reel with its current face randomly …

Software Development java
Member Avatar for baldturtle
0
165
Member Avatar for arjen

hello guys.. Can someone give me a code on storing path image and retrieve path into image using mysql database and vb.net/vs 2008. I only know how to make a browse button and get the image into hard disk and display it in picturebox. I'm done with the the problem …

Software Development image mysql vb.net
Member Avatar for lolafuertes
0
948
Member Avatar for mcook228

I have an assignment to write code to calculate a cubic spline. The values for my coefficients are correct, but the Gaussian elimination part of my program has me really confused. I was given code in C by my instructor, but am struggling in making it work with my code. …

Software Development c++
Member Avatar for iamthwee
0
1K
Member Avatar for emongev

I have a question about a C# windows forms application.... Im aware of the mouseEnter event and the Click events, but i cant seem to combine them, maybe i could get some insight on this problem =) What i want is to be able to have a matrix of components …

Software Development
Member Avatar for hyperion
0
133
Member Avatar for xcarbonx

Hello, my listbox contents output as 1 whole row like: Total Normal = 3 Total High = 5 Total Low = 6 When i want the output to be formatted like: Total Normal = 3 Total High = 5 Total Low = 6 Here is my code: [CODE] lstResults.Items.Add("Total Normal …

Software Development vb.net
Member Avatar for xcarbonx
0
169
Member Avatar for kidwon

Hi guys, This below is my code: [CODE]<script language="javascript" type="text/javascript"> function bc () { var bc = document.getElementsByTagName("BusinessCard"); for (var i=0; i < bc.length; i++) { var create_card = document.createElement("div"); create_card.setAttribute("class" , "BusinessCard" ); create_card.setAttribute("className" , "BusinessCard" ); document.getElementsByTagName("body")[0].appendChild(create_card); } } </script> </head> <body onload="bc()" > <BusinessCard> <Name>Somebody Somewhere</Name> <phone …

Software Development xml
Member Avatar for kidwon
0
130

The End.