132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for tucanoj

I've been playing around with recursion a little bit, admittedly it's been some time since I've used it, and I'm feeling pretty rusty. I was simply trying to recursively reverse a linked list and wasn't getting anywhere and finally google'd some code and came across the below snippet, [code=c] node …

Software Development c linked-list
Member Avatar for tucanoj
0
127
Member Avatar for anu07

I was going through my computer book,and I saw that "\a" can be used to emit a sound in c++,and I tried it as well,but my question is,is it possible to do the same without showing the standard output screen......??

Software Development c++
Member Avatar for anu07
0
67
Member Avatar for Brian Perrigan

[B]I've been given a homework assignment that goes as follows:[/B] We will write a program which inputs a 10-place ISBN number, cleans it up (removes spaces, and punctuation,) then strips the last digit (saving it) then re-calculates that last (check) digit from the rest of the number. If the result …

Software Development c++
Member Avatar for griswolf
0
492
Member Avatar for shankarz

[CODE]main() { char name[10],s[12]; scanf("\"%[^\"]\"",s); }[/CODE] How this scanf will scan?

Software Development c
Member Avatar for shankarz
0
99
Member Avatar for natd

I'm having trouble with my program. It randomises the craps results i.e how many games are won or lost on a particular roll. The problem is, it is supposed run 1000 games but it also randomises the number of games too. Usually between 1000 to 1005. I think it is …

Software Development c
Member Avatar for smurf6189
0
112
Member Avatar for Archenemie

Im sure ive parented everything up right buut when i run the code it doesnt show the panels right. As you can see from the code i want a 3 page notebook on the left half of the screen and a blank panel on the right side but i really …

Software Development python
Member Avatar for Archenemie
0
95
Member Avatar for Member 784291

how to make a program run when an external device is plugged in???(program run from the computer not an autorun from the flash)

Software Development c flash
Member Avatar for wisaacs
0
80
Member Avatar for jhaycee12
Member Avatar for hareaswar

i am also seeing the similar problem.. the code is here.. [code=c] #include<stdio.h> #include<string.h> int palindrome(char *a,int n); int main() { char a[20]; int b,n; printf("Enter the string to be checked\n"); scanf("%s",a); printf("The entered string is "); puts(a); printf("%c%c%c",a[0],a[1],a[2]); //empty line strlen(a); b=palindrome(a,n); if(b==0) printf("%s is palindrome\n",a); else printf("%s is …

Software Development c
Member Avatar for wisaacs
0
371
Member Avatar for Guest51

OK here is my program so far and I'm getting a compile error on my constructor located in class Inventory on line 50 [CODE] // Inventory Program Part 2 import java.util.Scanner; //Inventory program //This program monitors DVD inventory, price, and stock public class Inventory {//new class inventory public static void …

Software Development java
Member Avatar for NormR1
0
139
Member Avatar for alan4545

Hi Need some help writing some pseudocode can anyone help?

Software Development c++
Member Avatar for annaabella
0
108
Member Avatar for Ims333

I've searched for two days for a way that when you press a button (In this case button15) that when its pressed, it will retrieve a .txt from online. Basically I need to turn this: [code=c#] DirectoryInfo di = new DirectoryInfo("C:\\"); FileInfo[] rgFiles = di.GetFiles("*.dll"); foreach (FileInfo fi in rgFiles) …

Software Development
Member Avatar for Lusiphur
0
112
Member Avatar for Excizted

Hello, [I]Before you get scared away - my issue does not particular seem to relate to Quaternions or Vectors. More generally, it appears to be something compiler or C++ standard related, as my return call from the function is acting strange. You can eventually start reading the [U]concluding issue at …

Software Development c++ mathematics
Member Avatar for Excizted
0
196
Member Avatar for Dan08

Again, another hard question. So Ive got a function, and ive got a couple of try and exception in it, and basically what i need is, if those exception give me an error, i want that function to go to an end. So, how am i suppose to do this. …

Software Development python
Member Avatar for Dan08
0
170
Member Avatar for mrnutty

Download [URL="http://www.2shared.com/file/MGH_DXrx/lol.html"]this [/URL]great app, that I created. You will like it if you like basketball, especially.

Software Development c++
Member Avatar for mrnutty
0
71
Member Avatar for barathdon

[CODE] #include<iostream.h> #include<conio.h> main() { int c=2,a=5; clrscr(); c = a++ - a; cout<<c; getch(); } [/CODE] I know the answer of this program. The result is 0. But i want to know the working of this program(I'm a newbie to c++. So, please help me..) Thanks.

Software Development c++ first-post
Member Avatar for arkoenig
0
89
Member Avatar for vttuning

Hi i have another username but i cant login!! so i had to create a new account I'm doing a project in Visual C++....in Portuguese....i'm hoping you can help figure out the problem eventhough it's not in english... here is the whole code....incomplete in the int main and it's missing …

Software Development c++ visual-studio
Member Avatar for vttuning
0
133
Member Avatar for echellwig

Hi, I downloaded some code from a university website that calculates a metric evolutionary trees. I'm trying to run the program (called example.py) and the first line of the program is [CODE]from TreeGenerator import Tree_generator [/CODE] I did not think this would be a problem because TreeGenerator.py is another file …

Software Development python
Member Avatar for ultimatebuster
0
198
Member Avatar for M.Jama

I would be thankful if some one explain me where to start in order to access a database in Java on Eclipse Thank you in advance

Software Development java mysql
Member Avatar for M.Jama
0
73
Member Avatar for dupowdis

Thanks in advance for your help, everyone. ...So basically, for a program I have to do for this internship, I have to find a way to extract certain lines of temperature, density, and frequency data from a .txt file, and then pop them in 3 different string arrays. A typical …

Software Development java
Member Avatar for dupowdis
0
127
Member Avatar for Amoblaze

Hi, am trying to Write a C++ program to create a data file with several attributes. Accept n person’s information and display the same. So far this is what I have tried to do. My chaalenge is how to read the command line ipnut from the user to the file …

Software Development c++ puzzle
Member Avatar for WaltP
0
207
Member Avatar for Dan08

Hey people, I've got a file, looks like this: [QUOTE]england america spain brazil germany australia[/QUOTE] now, I need to read it line by line: [CODE]country = open('languages/country.lang', 'r')[/CODE] and give a value to it, like: [QUOTE]A1 = country.readline()[/QUOTE] and then A2 for the next country and so on. So I …

Software Development python
Member Avatar for TrustyTony
0
185
Member Avatar for bin shahid

Hello, I want to retrieve weather information of 'Chittagong' city of 'Bangladesh' country from "BBC.com/weather" from java application. but i don't understand where from i should start. Please give me suggestions. Its urgent. Thanks, Shahid

Software Development java
Member Avatar for NormR1
0
205
Member Avatar for kalpa23

c#, web forms, vs2003 i have this data grid view that im trying to create a shopping cart. my problem is when i data bind to each and every time if ther is previous binding that values still there how do i only bind the new value and display only …

Software Development
Member Avatar for Lusiphur
0
200
Member Avatar for pancakelove

[I]<<mod edit: [URL="http://www.daniweb.com/forums/thread244248.html"]split from here[/URL]>>[/I] Probably a long shot, since this thread is long since dead, but was hoping I could get a hand. I'm trying to do pretty much the same thing here, but I'm getting an error at this line: [code]self.storeli[self.counter].append(a)[/code] Throwing a KeyError: 0 at me, referring …

Software Development python
Member Avatar for woooee
0
96
Member Avatar for VBNick

I need a little help with this :icon_redface: if I use ifstream::read() and go past the end of the file, how do I tell how many chars have been read? thanks, Nick

Software Development c++
Member Avatar for VBNick
0
253
Member Avatar for shankarz

[CODE]while((fgets(receiving array,50,file_ptr)!=EOF);[/CODE] How this while is executed?

Software Development c
Member Avatar for Ancient Dragon
0
82
Member Avatar for TrustyTony

As I was student, the bracketed plurals were absolute 'NO, NO'. With this simple function you can cleanly avoid putting bracket plural(s) after your numbers. If the number deciding singular/plural should not be automatically included, you can make version with [icode]str(n)+' '+[/icode] eliminated. If you want to put automatically space …

Software Development apple python
Member Avatar for TrustyTony
0
771
Member Avatar for jtltgl

I am making a password genarator and having trouble with this part of code. I am trying to loop until length is meet but it only creates one char and I am trying to when it gets to certain char to skip and do nothing but loop until length is …

Software Development c++
Member Avatar for jtltgl
0
98
Member Avatar for MARKAND911

I have two forms named form1 and form2 respectively. And a MDI form named mdi1. I want to open form2 as a child of mdi1 when a button on form1 is clicked. How can I do this please help me.

Software Development
Member Avatar for k.d.m
0
107
Member Avatar for madlan

I'm writing a small search tool that searches a SQL Server database using Full Text Indexing. I have two text boxes with four radio buttons between (NEAR, OR, AND, AND NOT) Ex. CONTAINSTABLE(jobs, *, ‘computer NEAR California’) This works fine but if I start adding more text boxes\radio buttons (As …

Software Development gui vb.net
Member Avatar for GeekByChoiCe
0
73
Member Avatar for stark025

Hi. I am a student, and I have an report to do for our Computer Programming Fundamentals class. We are required to demonstrate the use and function of constructors and the JOptionPane class. I have implemented a simple age calculator using Java as my demo, and I intend to go …

Software Development java java-swing
Member Avatar for NormR1
0
222
Member Avatar for jefferlyn92

create a method sumOfDigit(String str) compute and display the sum of the digits found in str Example: String str = "1234hello12678"; sumOfDigit(str) -> returns 34 ---need some codes guys! can you HELP me?!

Software Development display java mathematics
Member Avatar for ANDIEniable
0
648
Member Avatar for seanvitalaim

Can someone please explain to me why I cannot move variables from object to object. I've been getting no sleep and burning myself out learning java and it is driving me crazy here is the example. [CODE]import static java.lang.System.out; class ONE { public static void main(String[] args) { TWO addition …

Software Development java
Member Avatar for NormR1
0
99
Member Avatar for aditya027

public class Sorting { public static void main(String[] args) { int j=10; int[] arr=new int[10]; for(int i=0;i<arr.length;i++) { arr[i]=j; j+=10; } int num=Integer.parseInt(args[0]); bsearch(arr,0,10,num); } static void bsearch(int[] arr2,int first,int last,int key) { while(first<=last) { int mid=(first+last)/2; if(key==arr2[mid]) { System.out.println("Found the key"); } else if(key<arr2[mid]) { last=mid-1; } else if(key>arr2[mid]) …

Software Development java
Member Avatar for NormR1
0
75
Member Avatar for ASardinia1

Well, I'm a college student with a dread C++ online class and now my (insert explicative) professor wants us to write a program for a diamond. The actual assignment is... Write a program that displays a diamond of given the odd length (an odd integer size less than or equal …

Software Development c++ legal
Member Avatar for regnerz
0
423
Member Avatar for sneekula

Is there a reliable way to 'pluralize' english words with Python?

Software Development python
Member Avatar for TrustyTony
0
6K
Member Avatar for Sarkahn

Hello. Could someone please help me understand what's going on with this code? What I'm trying to do is read each line of a file into a vector<char const *>. I feel like the answer is probably extremely obvious but I just can't figure it out. [CODE]int main( int argc, …

Software Development c++ file-system
Member Avatar for Sarkahn
0
1K
Member Avatar for iqra123

hello! i have to find time in nanosecond of a particular process and for that i am using clock_gettime() function. i tried different codes i got from net but getting same error [QUOTE] error: ‘CLOCK_PROCESS_CPUTIME_ID’ undeclared (first use in this function)[/QUOTE] i have included relavent header file of time also. …

Software Development c
Member Avatar for Banfa
0
2K
Member Avatar for kaydee123

Hello, I defined a list in a class and want to do a class containing get/set functions. How can I set or get a data struct (list element) that has variables of different type and each variable is taken separably as an input from the user (I do the input …

Software Development c++
Member Avatar for jonsca
0
137
Member Avatar for khunmato

Hello! I have constucted a code for the card game 21. The code uses inputDialogs to "talk" the the player. I thought my shool assigment was over by doing just that...I was wrong, our teacher dumped a new bomb on us. With these kind words; [I]Develop task 5 (Twenty-one card …

Software Development gui java java-swing user-interface
Member Avatar for JamesCherrill
0
2K
Member Avatar for aravind s

Hi. I'm new to daniweb and i am also a novice programmer. I have this assignment to get a shape, then a shape inside that one, and then another inside the second one, and then fill each shape in with different patterns. Here is an example. if the user enters …

Software Development c
Member Avatar for hinduengg
0
291
Member Avatar for mark88211

this is what i have so far, i need to combine 2 c strings, print them backwards and figure out whether they are a palindrome or not. (the for loop is where i stopped, it could be wrong) [CODE]#include<iostream> #include<cstring> using namespace std; int main( ) { char s1[15], s2[8]; …

Software Development c c# c++
Member Avatar for bagi.padhu
0
425
Member Avatar for madzam

someone please help me do the loop .....thanks ... ..here is the problem ...the user will enter integer values until 0 is entered. The program will find the lowest and highest values entered.It will also calculate the total number of value entered..... [code]#include <iostream> #include <iomanip> using std::cout; using std::cin; …

Software Development c++
Member Avatar for mahmud.2345
0
95
Member Avatar for Guest51

I am a student working on an inventory app. Until this current assignment I felt I half way knew what I was doing. What is required is the following: [B]~Modify the program to handle multiple items:[/B] should work with this code added - it worked on another program [CODE]//Prompt user …

Software Development app-store java
Member Avatar for JamesCherrill
0
207
Member Avatar for john butler

here is one program which has 1 abstract class without abstract method. its also works fine. Then what the use of abstract class, any how it does not allow to create objects, we can use this with concrete class to implement method defined in abstract class which we have to …

Software Development java
Member Avatar for musthafa.aj
0
114
Member Avatar for Member 785216

Okay so i have to get my VB programme to connect to an access database which i did, just dragged and dropped and clicked. My data base has 3 tables,products, customers and orders. I have to be able to edit, update and delete customers and products. People also have to …

Software Development visual-basic
Member Avatar for jhai_salvador
0
91
Member Avatar for anuj6928

hello there... acctually i m creating a desktop application in vb.net so on the data insertaton page i had got an error that is "the ConnectionString property not initilized".. so i m posting all my code here... kindly help me.. [code] Public Class Registration Private Sub Button1_Click(ByVal sender As System.Object, …

Software Development dataset vb.net
Member Avatar for anuj6928
0
175
Member Avatar for Joe Shmoe

I am a VB programmer, so I know a lot about programming. I am just new to C and want to ask a simple question. How can I read a file and use strtok with space as the delimiter and have access to all tokens in memory? The example provided …

Software Development c
Member Avatar for Ancient Dragon
0
128
Member Avatar for GAME

Hello, I am trying to use this code: [code] PictureBox1.ImageLocation = "http://avatar.xboxlive.com/avatar/" & TextBox1.Text & "/avatar-body.png".Replace(" ", "%20%"); [/code] The error I get is: [code]Error 2 Operator '&' cannot be applied to operands of type 'string' and 'string' C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Lucky Se7en\Lucky Se7en\GamercardViewer.cs 27 37 Lucky Se7en …

Software Development visual-studio
Member Avatar for Lusiphur
0
332

The End.