64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for murnesty

if i declare size 5 array [CODE]char ch[5]={'1','2','3','4','5'};[/CODE] Then the null will store at the address ch+5 ? even i didn't declare the size for the null to place. If so mean it may overlap value on that memory address?

Member Avatar for NP-complete
0
164
Member Avatar for nick6987

Design a cashier change maker that will take as input: a floating point value. Value: "change due" and will convert it to proper currency (from $20 down to pennies) amounts to be handed as change to the customer i am not sure how to use the rounding correctly every time …

Member Avatar for nick6987
0
217
Member Avatar for Jollyyy100

Hi i'm doing a project and i need help. I'm designing a system, whereby am unable to use 2 different login authorities, which are Admin and Non-Admin. I am using VB.NET and Ms. Access and need help for the codes. I want something like, if i click on admin/non admin …

Member Avatar for maccinelyro
0
881
Member Avatar for dragon_chick

Hi all. I'm writing a program to explain and verify the birthday paradox. I am generating 1000 sets (only 10 to test with) of birthdays, checking for matches, then displaying the results. I'm using srand to seed my generator and rand() to get 23 sets. The problem is 2-fold. 1) …

Member Avatar for dragon_chick
0
415
Member Avatar for gahhon

is possible to work of return statement with Math Class? eg, [CODE]return Math.pow(2,2);[/CODE]

Member Avatar for gahhon
0
149
Member Avatar for dospy

when you want to decript a program's protocol how do you do it? you use an packet listener(eg. WireShark) and try to figure out what each packet means? is this the only solution? cuz it seems to me like a lot of hard work, is there anything to make this …

Member Avatar for dospy
0
191
Member Avatar for lastbencher

The following code is given in my Data Structure reference book. [code=c] #include<stdio.h> main() { int i, *pi; float f, *pf; pi = (int *) malloc(sizeof(int)); pf = (float *) malloc(sizeof(float)); *pi = 1024; *pf = 3.14; printf("an integer = %d, a float = %f", *pi, *pf); free(pi); free(pf); } …

Member Avatar for lastbencher
0
156
Member Avatar for ruchi18

Hi I have a project creating a website in asp.net and there i am creating three project for different access layers like data access ,business access but when I am using that namespace in my project getting error at build time type or namespace not found however I add refrence …

Member Avatar for ruchi18
0
144
Member Avatar for Shodow

can u help me convert the cout to printf..i dont have a clue how.. tnx [CODE]#include<iostream.h> #include<string.h> #include<conio.h> int findSimilar(char[],char[]); void checkValue(int,int); int main(){ char boy[50]; char girl[50]; int similarInBoy=0; int similarInGirl=0; int total; clrscr(); cout<<"Enter Boy's Name: "; cin.getline(boy,50); cout<<"Enter Girl's Name: "; cin.getline(girl,50); similarInBoy=findSimilar(boy,girl); similarInGirl=findSimilar(girl,boy); total=similarInGirl+similarInBoy; cout<<"Boy: "<<similarInBoy<<","; …

Member Avatar for Narue
0
556
Member Avatar for lastbencher

This code is not running. i'm using gcc [code=c] #include<stdio.h> int main() { struct book { char name[10]; float price; int pages; }; struct book b[5]; int i; for (i=0; i<5; i++) { printf("Enter name, price and pages\n"); scanf("%c %f %d", &b[i].name, &b[i].price, &b[i].pages); } for (i=0; i<5; i++) printf("%c …

Member Avatar for lastbencher
0
126
Member Avatar for Mi_99

So my title was meant to be array not loop I need to create an application that will generate random spots so far my work is this [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.util.Random; public class Shape{ private int x; private int y; private int width; private …

Member Avatar for JamesCherrill
0
203
Member Avatar for katisss

I have to find a cost optimal solution for staying on campsites. It is kind of weigthed interval scheduling with a given number of intervals (nights). I wonder how to tackle it, dynamic programmic will work for cost optimizatation gernerally but how to build in the restriction on the number …

Member Avatar for katisss
0
136
Member Avatar for tusharbhatia

Hi, I am trying to search for numbers in an array - "explodedArray" which has been "exploded from a text entry. The aim is to be able to allow the user to type something in like " 5 + 5 " or "5 plus 5" or even "5 plus 5 …

Member Avatar for tusharbhatia
0
149
Member Avatar for Shodow

[B]BEFORE[/B] [IMG]http://www.daniweb.com/forums/attachment.php?attachmentid=22439&d=1317523788[/IMG] [CODE]#include<iostream.h> #include<string.h> #include<conio.h> int findSimilar(char[],char[]); void checkValue(int,int); int main(){ char boy[50]; char girl[50]; int similarInBoy=0; int similarInGirl=0; int total; clrscr(); cout<<"Enter Boy's Name: "; cin.getline(boy,50); cout<<"Enter Girl's Name: "; cin.getline(girl,50); similarInBoy=findSimilar(boy,girl); similarInGirl=findSimilar(girl,boy); total=similarInGirl+similarInBoy; cout<<"Boy: "<<similarInBoy<<","; checkValue(similarInBoy,1); cout<<"\n"; cout<<"Girl: "<<similarInGirl<<","; checkValue(similarInGirl,2); cout<<"\n"; cout<<"Total: "<<total<<","; checkValue(total,3); cout<<"\n"; getch(); return 0; …

0
65
Member Avatar for cdn88

I have an issue that's really confusing me... Below I am calling an initialize function: [CODE] void Initialize (List *L) { char* initialize = "initialize"; int i; for (i=0; i<MAXLISTSIZE; i++) { strncpy(L->items[i].name,initialize,MAXNAMESIZE); L->items[i].name[MAXNAMESIZE - 1] = '\0'; L->items[i].grade = 0; } L->count = 0; } [/CODE] And it seems …

Member Avatar for gerard4143
0
1K
Member Avatar for rockout15

can anyone help me... the problem is that i want to hide a form when i click the button log out and show the log in form since you just log out and not close the form. but it does not happen... here's my code... [ICODE]using System; using System.Collections.Generic; using …

Member Avatar for rockout15
0
125
Member Avatar for drameshgar1

hy! i am designing game in JAVA as my university project, i want to make myself unique by doing something different ---soo i though of making iphone game that runs java...I designed the iphone app, which is just a icon and few other things...when u click nothing happens but i …

Member Avatar for drameshgar1
0
157
Member Avatar for funwidak

Hello, I have recently joined a orgainization as a [B]Java Engineer Trainee([/B]0 Years of Experience) and working on a project(80% ABAP people are working on project) in mainteance from last 2-3 Years. The Work in the project is of basically in ABAP and [B]Core Java[/B] (Only Basic Java code is …

Member Avatar for peter_budo
0
249
Member Avatar for sidyusuf

hi...i m again here... i have a datagridview on a form which contains studentname (in alphabetical order) and a blank rollno field according to the particular class.Now what i m suppose to do is to assign roll no on button click, starting from first student to last student. Roll no …

Member Avatar for sidyusuf
0
243
Member Avatar for Prasadbabu

Hi Friends, I created one database like credit card statement. Purchases all in one table. Debited all in another one table. I am trying to link two tables using with inner join. But its repeating the data depending on purchases record count. Table1 = Purchases Table2 = Received [COLOR="Green"]SELECT * …

Member Avatar for Prasadbabu
0
405
Member Avatar for JoshuaBurleson

Early this morning, and I haven't a clue how this slipped by me, I learned about the Android SDK and Python for Android, I did a little research, it's very intriguing. Has anybody worked with this at all? Do most built in libraries and modules work for it? How do …

Member Avatar for JoshuaBurleson
0
365
Member Avatar for maverick420

[TEXT]I'm trying to write an application that will input five numbers from the user. The program should print out the largest and smallest numbers. It should print how many of the numbers are two digit and how many of the numbers are three digit. It should also print out the …

Member Avatar for peter_budo
0
254
Member Avatar for gahhon

as we know the code of scanner is like this, [CODE] ... Scanner scan = new Scanner(System.in); System.out.print("something is something: "); [COLOR="Red"][type] [variable name] = scan.next();[/COLOR]... [/CODE] so here is my problem, how can we scan char type?

Member Avatar for stevanity
0
90
Member Avatar for davy_yg

[CODE] <?php // a) class LongName { var $firstname = " "; var $middlename = " "; var $lastname = " "; function firstname($string) { echo "First Name : ". $string; } function middlename() { if (middlename){ echo "Middle Name : ". $this -> middlename; } else { echo "Middle …

Member Avatar for davy_yg
0
140
Member Avatar for torbecire

I am using an assembly compiler to try and print the first 12 numbers. I have succeeded in adding, but it won't print some of the numbers. I want. 1 1 2 3 5 8 13 21 34 55 89 144 BUT GET. 1 2 5 13 34 89 233 …

Member Avatar for ynahneng
0
16K
Member Avatar for anand01

Hi all, I am learning j2ee with the help of this forum . First thanks for all of your replies realy that makes me to know more things . Now i have doubt, i don't know whether it is silly or not . How does RequestDispatcher works? I know it …

Member Avatar for anand01
0
112
Member Avatar for Raja Pandiyan

Hi, this will work in Edit button click,Getting values from combobox and given input to query.Oprdgv is my Datagrid. I got the error Like, "unable to cast the type 'system.int32' to type 'system.data.datatable" [CODE] Private Sub EditButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditButton.Click Dim mcode As String …

Member Avatar for peter_budo
0
297
Member Avatar for fullarmorzz

[CODE]#include<stdio.h> #include<conio.h> main() { char c; printf("Enter the code for the chart: \n"); do { scanf("%c",&c); switch (c) { case 'A':printf("Area Chart\n");break; case 'B':printf("Bar Chart\n");break; case 'U':printf("Bubble Chart\n");break; case 'C':printf("Column Chart\n");break; case 'N':printf("Cone Chart\n");break; case 'Y':printf("Cylinder Chart\n");break; case 'D':printf("Doughnut Chart\n");break; case 'L':printf("Line Chart\n");break; case 'I':printf("Pie Chart\n");break; case 'P':printf("Pyramid Chart\n");break; case …

Member Avatar for ashok1514
0
133
Member Avatar for Marissak

The question I'm trying to answer is: Write an object oriented C++ program to translate an infix expression to postfix. I have done much of it but after I debug the only output is "Postfix:" and I cannot figure out why. This is my code so far: #include <iostream> #include …

Member Avatar for GouseKSyed
0
234
Member Avatar for J-Dub

I am trying to build an animation. It just has two pictures or scenes. I want it to start at one picture and end at another. When I run my project all I see is a blank screen. I have checked and made sure that my Image paths are correct. …

Member Avatar for J-Dub
0
192
Member Avatar for Zssffssz

Ok I know the basics of ofstream and ifstream but it seems as if every tutorial on it leaves this out. How do I delete files in c++ console app. Reason? I want to use a temporary file in my app for transferring betting two programs that open and to …

Member Avatar for NetJunkie
0
182
Member Avatar for Fireprufe15

I want to save the contents of my richedit to a plain text file. With my current code, only a partial of the richedit's text ends up in the plain text. Could you please tell me what's wrong with my code: [CODE] var fSave : TextFile; begin AssignFile(fSave, dlgSave.FileName + …

Member Avatar for AceStryker
0
2K
Member Avatar for knightofsoshi

[CODE] void customer (struct data *cust1); void menu(); void printReceipt(struct data *cust1, float &balance); struct data{ char name[20]; int accno; }cust, *cust1;[/CODE] above is an excerpt from my completed c++ program. my c++ coding is running well and i dont have a problem with it, but i am required to …

Member Avatar for AceStryker
0
247
Member Avatar for cdn88

I would like to access the name field from the array items and print the name but I am having trouble. I created a pointer 'L' in callInitialize and set it to the upper struct type List which I named 'studentList'. [code] int callInitialize () { /*Initialize a List*/ List …

Member Avatar for cdn88
0
78
Member Avatar for tapuwa2002

I have made a select statement with a date condition seems like its not reading the date condition please check the code below [CODE] Select * From tbltest WHERE (((Validity.ToDate)<><cfqueryPARAM value = "#31/8/2011#" CFSQLType = 'CF_SQL_DATE'>) [/CODE] Please help I don't want dates that are equal to 31/08/2011 its getting …

Member Avatar for arrgh
0
258
Member Avatar for Violet_82

Hi all, I am in the process of redoing my website and I have done pretty much all the html and css for it ([url]http://antobbo.webspace.virginmedia.com/photogallery/test/home.htm[/url]), so now I would like to add some javascript/jquery. This is essentially what I would like to achieve. On this page [url]http://antobbo.webspace.virginmedia.com/photogallery/test/gloom.htm[/url] I have a …

Member Avatar for Violet_82
0
957
Member Avatar for cdudefire

I have been ok so far but now I am having a problem with counting the amount of time that cars spend in the lot during the day and counting the total cost at the end of the day. Any pointers in the right direction would be helpful. Here are …

Member Avatar for cdudefire
0
458
Member Avatar for cjohnweb

Hey there, I'm still kinda learning JS. I can't figure this one out. I googled and discovered the issues is with placing the <!DOCTYPE html> tag at the top, but how to resolve the issue? I've a document with some Javascript and JQuery in it, it works great! I add …

Member Avatar for Taywin
0
2K
Member Avatar for minimi

I'm writing a reverse Polish calculator. If the input is 1 2 - 4 5 + *, the output should be 9, but I'm getting -9. Does anyone see where the problem lies? Thanks! [CODE]#include <stdio.h> #include <stdlib.h> // for atof() #include <ctype.h> /* denifitions for main() */ #define MAXOP …

Member Avatar for WaltP
0
262
Member Avatar for NewbieXcellence

Hello everybody! I'm trying to produce a timestamp (system time) in windows (Python 2.7) with resolution equal to or better than microseconds. Calling time.time() repeatedly in a loop it appears it only updates in approximately 0.01 second increments. Using datetime.datetime.today() seems to show similar results. Anybody have a possible way …

Member Avatar for NewbieXcellence
0
503
Member Avatar for dospy

i am planning to start learning how to use threads. my question is: should i first learn windows.h's functions for threading before boost to get the pattern or should i jump right to the boost threads? ps: sry if i posted in the wrong section

Member Avatar for dospy
0
251
Member Avatar for SyncMaster170

Hello peeps, This is really getting annoying, Im trying to figure out how to check whether or not a member is in my datagrid. I have 5 columns: firstname, lastname, membership, accountid, date. Can someone help me out here????????

Member Avatar for Mitja Bonca
0
129
Member Avatar for neeraj goswami

[CODE]//ASSIGNMENT NO- 4 //EMPLOYEE DATABASE #include<stdio.h> #include<conio.h> //STRUCTURE DEFINATION struct emp1 { int id; int dflag; char name[10]; float salary; }; int main() { //INITIALISATION struct emp1 e[20]={0,0,"\0",0.0}; int accept(struct emp1 [],int); int display(struct emp1 [],int); int append(struct emp1 [],int); int delete1(struct emp1 [],int,int); int modify(struct emp1 [],int,int); int no=0,v=0,u=0,ch=0,count=0; …

Member Avatar for N1GHTS
0
158
Member Avatar for sunny124

I tried using (*game_data.blocks), (game_data.*blocks), (game_data.blocks) but none of them work. I'm getting a error msg: 'cannot convert sprites* to sprite_data** in assignment' ----------------------------------------------------------- [CODE] typedef struct{ //sprite _sprites[]; sprite *blocks; sprite ball; sprite paddle; int numb_brick_sprites; }sprites; [/CODE] ----------populate_bricks procedure------------- [CODE] void populate_bricks(sprites &game_data){ game_data.numb_brick_sprites++; sprites *temp_ = (sprites*) …

Member Avatar for sunny124
0
134
Member Avatar for davy_yg

event_manager.php [CODE] // define variable $id = isset($_POST['id']) ? $_POST['id'] : ''; $event = isset($_POST['event']) ? $_POST['event'] : ''; $tempat = isset($_POST['tempat']) ? $_POST['tempat'] : ''; $mulai = isset($_POST['mulai']) ? $_POST['mulai'] : ''; $selesai = isset($_POST['selesai']) ? $_POST['selesai'] : ''; $keterangan = isset($_POST['keterangan']) ? $_POST['keterangan'] : ''; session_start(); // undefined …

Member Avatar for pritaeas
0
223
Member Avatar for jpknoob

Hi, i am trying to make a form that when a button is clicked, a hidden div is displayed with radio buttons. i have managed to do this, however, the pagerefreshes and after a few seconds the page resets back to normal. can anyone explain what i'm doing wrong. My …

Member Avatar for gotboots
0
203
Member Avatar for davy_yg

input_berita.php [CODE] $id = isset($_POST['id']) ? $_POST['id'] : ''; $confirmation = isset($_POST['confirmation']) ? $_POST['confirmation'] : ''; $kategori = isset($_POST['kategori']) ? $_POST['kategori'] : ''; $isiBerita = isset($_POST['isiBerita']) ? $_POST['isiBerita'] : ''; $judul = isset($_POST['judul']) ? $_POST['judul'] : ''; //Load berita if (!empty($_REQUEST['id'])){ $result = mysql_query("SELECT * FROM berita WHERE id =".$_REQUEST['id']) …

Member Avatar for pritaeas
0
260
Member Avatar for rahman86

Hello everyone here. I am new to vb.net database programming yet i want to create a point of sale software using it. So far I have created a local database, POSSdatabase.sdf , and I have 2 tables, Inventory and Transactions. My problem is how do I relate these 2 tables? …

Member Avatar for Netcode
0
164
Member Avatar for davy_yg

[CODE] $kategori = isset($_POST['kategori']) ? $_POST['kategori'] : ''; //Hapus berita // undefined index: mode if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode'])){ if ($_REQUEST['mode'] == "delete"){ $id = $_REQUEST['id']; $result = mysql_query("DELETE FROM berita WHERE id =".$id) or die(mysql_error()); $confirmation = ($result) ? "Data Telah terhapus." : "Gagal menghapus data."; } } ?> <div …

Member Avatar for pritaeas
0
310
Member Avatar for gunjannigam

I am attaching my complete code, which I was currently developing. I am not able to get why doesn't my KeyListener work. None of the KeyListener events are fires on pressing the keyboard. Please have a look and tell me the flaws in my code [ATTACH]22414[/ATTACH]

Member Avatar for gunjannigam
0
8K

The End.