107 Topics

Member Avatar for
Member Avatar for Efficience

I have written a code for checking vfork in unix. But I am getting the ambiguous behavious. When I am using exit(0) in child process , output is fine i.e; output :- Before fork I am a child My name is parent child PID=> 23133 kValue => 2 ] But …

Member Avatar for Efficience
0
282
Member Avatar for nick100555

I have the following CashRegister class where i must implement 3 methods: -getSalesTotal total up sales for the day -getSalesCount total number of sales for the day - rest a reset method that returns all instance variables to 0 Here is my code any help on mistakes i may have …

Member Avatar for Syrne
0
329
Member Avatar for infantheartlyje

Hi folks, this is my code. I'm passing a date string [MMDDYYYY](e.g., 01022000) to the function check periods. Now i send the date to sepdate function. This function should separate the dates. if i print the returned array, am getting wrong answer. [CODE] int *sepdate(char *date) { long int dt; …

Member Avatar for infantheartlyje
0
137
Member Avatar for James19142

in this program i'm writing, i seem to keep getting rounded down values. At first i though it was because i was declaring my return variable as an integer so i made sure i wasnt doing that and changed all number variables in the class to doubles to ensure i …

Member Avatar for Fbody
0
158
Member Avatar for rakwel10

this is a noob question. I'm quite confused sometimes when to use 'return' everytime Im doing my php and javascript codes. Maybe a plain english answer can help me : ) thanks!

Member Avatar for vibhaJ
0
119
Member Avatar for pfm200586

Hello everyone. I have a program that is driving me crazy. It is a cashier change return where the user enter the amount owed and the amount paid and when he/she press calculate the program should display the change due as well as the number of Dollars, Quarters, Dimes, Nickels, …

Member Avatar for Reverend Jim
0
395
Member Avatar for klenne

Hi, I'm trying to check the login. The values of id and pw are send from a textbox and the values of userid and password are from a mysql database. I try to compare them and if they are equal i want to return true and else return false. But …

Member Avatar for klenne
0
268
Member Avatar for saadi06

Hi, I am having a problem in paypal integration.I have integrated the paypal payment method successfully but the values are inserted in the database when the user returns from the paypal back to the website.I need to make a script that when the payment occurs the values are returned to …

Member Avatar for saadi06
0
157
Member Avatar for mrbungle

I have a textbox, and it's set to multiline, so a user can enter a few sentences. The problem is, if the user hits the enter button while in the textbox, it's starting a new line. This data is being saved as a text file, and it's causing problems when …

Member Avatar for mrbungle
0
1K
Member Avatar for ana_1234

Hey, Does anyone know how to cpy from one file and redirect to another. I know I have to use the ofstream but I'm stuck. [CODE] while (!in1.eof()) // while not end of input file { in1.getline(current, 100); // read a character from input file out1.in }[/CODE] I'm stuck. I …

Member Avatar for Narue
0
337
Member Avatar for emc22

I'm trying to create a class that calculates for the next possible coordinate for a Bishop Piece for my chess program and I encountered this problem. I used a JOptionPane to test for the results and I can't understand how it got that result. The first JOptionPane shows false because …

Member Avatar for emc22
0
166
Member Avatar for oalee

I've been reading and posting again for the past 2 days after years of inactivity. (I've only had the spare time and resources lately) It is only now that I realized that I have missed so much since I became inactive. You know what? I actually missed DW and everything …

Member Avatar for jingda
1
139
Member Avatar for Executionerr

Hello, it seems I am having some difficulties with my project in witch I am training my C# skills. Well, the problem is I have wrote the biggest part of the code, but I have problem to finish what i started, so I left blank code lines. Here is a …

Member Avatar for RunTimeError
0
117
Member Avatar for geekman92

hi i was wondering if (and how) you can create nested methods in c#. c# seems to do it with size and other things. something.Size returns a value but also something.Size.X returns a value. how can i do something like this myself? Thanks Ollie

Member Avatar for geekman92
0
150
Member Avatar for Spiffy P Mcgee

The exercise tells me to find the error in this code [CODE] int g() { cout << "Inside function g" << endl; int h() { cout << "Inside function h" << endl; } } [/CODE] The listed error is that function h should not be defined inside of function g. …

Member Avatar for Ancient Dragon
0
125
Member Avatar for Splam Bub

Hello DaniWeb! I'm trying to return an array of strings from a function but I'm not sure how to do so. I've done the prerequisite Googling and have found people on this discussion board recommending to return char** which, it is said, can then be converted back into 2d array …

Member Avatar for Splam Bub
0
152
Member Avatar for vineeshvs

i allocate memory for b_edge in function bark_edge and give value to only b_edge[1][1] and try to return b_edge from function. segmentation fault comes? can you please check why? [CODE]//function bark_edge+main program #include<stdio.h> #include<math.h> #include<stdlib.h> double **bark_edge(); main() { double **b_edge; b_edge=bark_edge(); printf("%f",b_edge[1][1]); } //FUNCTION-bark_edge double **bark_edge() { int i=0; …

Member Avatar for vineeshvs
0
178
Member Avatar for BioJavaPhobic

Hello, I'm a biologist trying to do some bioinformatics, so new to Java and new to this forum. I've searched all over the forum for previous threads on this topic, but can't find an answer that has helped me. Apologies if I've missed something already posted that may help solve …

Member Avatar for BioJavaPhobic
0
289
Member Avatar for TheOnlyNemesis

Hey, i am struggling with this program, i have tried everything i can think of but it still says missing return statement on public String processInput(String theInput){ [CODE]package clientserverassignment; import java.net.*; import java.io.*; public class Protocol1 { private static final int WAITING = 0; private static final int SENTTOS = …

Member Avatar for jon.kiparsky
0
210
Member Avatar for theoryforlife

Hello, I'm taking a 100-class (beginner) in C++ Currently I'm stuck in one of the assignments due where it asks for the program to have the user return to the beginning if there's an error, as well as create an out put of: + ++ +++ (...) The current code …

Member Avatar for theoryforlife
0
246
Member Avatar for kxpatel29

Requirement 1) Modify the code to find and print sum of the same series from 1/2 through 1/n multiple times, where each n is read from data file. Requires nested loop with the inner loop summing up series and outer loop allow inner code to repeat once for each n …

Member Avatar for kxpatel29
0
176
Member Avatar for Oddone

This is basically to request help with my program, as was already evident. I am a student, and an assignment asks me to "Write a method that computes the spherical distance between two points on the surface of the earth, given their latitudes and longitudes." I have written this so …

Member Avatar for Oddone
0
162
Member Avatar for JordanHam

I have a function that takes an array, calculates the ln of that array into another array called lnt. I would like to pass lnt back to the main. I know it has something to do with int *foo or something but I cannot seem to get a code to …

Member Avatar for Fbody
0
157
Member Avatar for Gh.S

Hi, This is my first post in daniweb! I've two questions: First question: I'm currently studying about classes, and could get '=' overloading format: [CODE]​[COLOR="Red"]T&[/COLOR] T::operator =(const T& b);​[/CODE] Why we set it to return reference? what's the use? Why couldn't simply be: [CODE]​[COLOR="red"]void[/COLOR] T::operator =(const T& b);​[/CODE] I've used …

Member Avatar for Gh.S
0
263
Member Avatar for bensewards

Hey guys, This is my first official post on DaniWeb :) I am new at programming in C++ using visual studios, and right now I am fooling around with storing user input into Arrays. I am having a problem with my code, using an array size of 3 to store …

Member Avatar for jonsca
0
209
Member Avatar for keltik

Hi there, at university i have to program OO-style in Python. What i got now is a "Point"-class and a "Triangle"-class. The "Triangle"-class has a method [ICODE]a()[/ICODE] that needs to return the length of the AB-edge, but it doesn't instead it concatenates the Point.__str__() methods return values together, which is …

Member Avatar for TrustyTony
0
151
Member Avatar for jeremy62

so basically i wrote a progarm that begins with a menu allowing you to select one of 5 functions, but at the end of whichever function i would like it to return to the menu the problem is i dont know how to do that and would like any tips …

Member Avatar for Shankye
0
250
Member Avatar for baby_c

please anyone help me to catch this.i tried to return an array from function and access it within main function.i just got a warning [CODE]"function returns address of local variable "[/CODE] and when i execute the program it gives garbage values as array elements..cam you help me pls... [CODE]#include<stdio.h> int …

Member Avatar for baby_c
0
142
Member Avatar for Sunshineserene

Hi, I have a text file that I'm going to read, and then parse it. After parsing it, how do I return it into it's original position or layout as before? Because now after parsing it, my output is printed out individually, instead of printing it out how it looks …

Member Avatar for Sunshineserene
0
205
Member Avatar for vikas.kethineed

I have this method to see whether not the year is a leap year or not. heres the code i get the error missing return statement at the end. What can i do , i can't add return true or return false, becuase that screws it up. public boolean isLeapYear() …

Member Avatar for kramerd
0
225

The End.