132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for maverick405

This program runs perfect just want to know if I have to do this arithmetic operations using functions how can I do that? [code] // Arithmetic.cpp - This program performs arithmetic, ( +. -, *. / ) on two numbers. // Input: Interactive // Output: Result of arithmetic operation #include …

Software Development c++
Member Avatar for mrnutty
1
121
Member Avatar for wyett

So, I'm asking a user to input a fraction in the form of this: +3 3/4 I know I can use a search to find where the first instance of something happens, but how do I actually take whats before it? Example: I can tell it to search for white …

Software Development c++
Member Avatar for wyett
1
115
Member Avatar for jmangu

Hello, I'm trying to compile a program related with serial communication via RS232. I've found this program at microsoft page [url]http://support.microsoft.com/?scid=kb%3Ben-us%3B39501&x=9&y=11#top[/url]. When I try to compile this same program in Dev C++ editor the following message appears: bios.h: No such file or directory. Please, help me about what can I …

Software Development c
Member Avatar for Ancient Dragon
1
3K
Member Avatar for Trogan

Hi, I am trying to get the max number from an array, but I'm not sure how to tackle it. This is what I have so far. [CODE]import javax.swing.*; public class InitArray { public static void main( String args[] ) { int array[] = { 69, 23, 47, 81, 92, …

Software Development java java-swing
Member Avatar for Ezzaral
1
985
Member Avatar for 21KristianN

Dear everybody I really need your help!! I have made a small application in Visual Basic 2008 Express. It's a small form application with a Database connected to the project. (made from the wizard in VB express) My problem is that when I deploy my application i can't find the …

Software Development vb.net visual-basic
Member Avatar for 21KristianN
1
204
Member Avatar for restrictment

Hello, I just finished my text-based RPG called Helsmich, however I need a few testers to find bugs/errors and tell me. There are quite a few variables that can be changed in the games such as your name, money, armor, weapon, kills, deaths, strength, speed, defense, accuracy, health, attributes, level, …

Software Development c++
Member Avatar for restrictment
1
360
Member Avatar for scott6480

Can anyone tell me why line 140-144 of this program does not do what it is supposed to do. Here is the output and you can see it is all blank? What am I missing? hit any letter keys to add items to the order and then = to stop …

Software Development c++ data-structure
Member Avatar for pecet
1
143
Member Avatar for dmitriylm

Hey guys (and girls), I'm trying to write a program that will read a simple text file and output a file with the same contents with the addition of line numbers. This is what I have so far: [code] #include<iostream> #include<iomanip> #include<fstream> using namespace std; int main() { char filename1[20],filename2[20], …

Software Development c++ file-stream file-system ios
Member Avatar for vmanes
1
104
Member Avatar for julie_kaz

I need help understanding julian dates. I am trying to create a program using julian dates where user enters month & year and show the calendar of that month. I especially don't understand the "int toJulian()"... here is what I have so far: [CODE] #include <stdio.h> #define START 1900 //fixed …

Software Development c
Member Avatar for Ancient Dragon
1
2K
Member Avatar for Soileau

[CODE]#include <stdio.h> struct poly { int len; int arr[]; char *name; }; int main() { int i; struct poly p; p.len = 45; p.arr[3] = {1,1,1}; p.name = "Josh"; printf("%d",p.len); for(i = 0; p.arr[i] != NULL ; i++) printf("%d",p.arr[i]); printf("%s",p.name); return 0; } [/CODE] I tried to make a simple …

Software Development c
Member Avatar for Mathura
1
169
Member Avatar for kenny1989

Hi all, For my project I'm doing a comparison between solving ODE's in MATLAB and using the GPU to solve them. Anyone know of an accurate way of timing how long the program takes to run on the gpu (same kind of accuracy provided by matlabs tic toc command)? I …

Software Development c++
Member Avatar for VernonDozier
1
189
Member Avatar for cwarn23

Hi and I have been working on a simple problem but can't seem to find any solution and have tried browsing the net. My question is how do I append to an array. Below is the code I tried but still doesn't work. [CODE]String[] names={""}; if (charcheck1==true) { String[] chartmp={"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; …

Software Development java
Member Avatar for cwarn23
1
353
Member Avatar for hussamo

[code=c++] #include <iostream> #include <string> #include <cmath> #include <cstring> #include <cctype> using namespace std; class link { struct employee { int x; employee *next; } void insert() { employee *temp; temp=new employee; employee *first; first=new employee; if(first=NULL) { employee *tmep; temp=new employee; temp=first; cin>>first->x; first->next=NULL; } else { temp=first; first=temp; …

Software Development c++
Member Avatar for mrnutty
1
72
Member Avatar for ddanbe

I have a main form which is going to use much input data typed in by the user. So I thought to make a separate form to handle the input. The closest to a solution was this thread [url]http://www.daniweb.com/forums/thread231368.html[/url] But I don't want the second form to be disposed off, …

Software Development
Member Avatar for mjean
1
138
Member Avatar for endisbegun

For my assignment, I have to "Write a program that reads integers, one per line, and displays their sum. Also, display all the numbers read, each with an annotation giving its percentage contribution to the sum. Use a method that takes the entire array as one argument and returns the …

Software Development java
Member Avatar for endisbegun
1
862
Member Avatar for chet6

Hi, Could anyone please explain how the memory allocatio is done in case of double pointers?

Software Development c c# c++
Member Avatar for manutm
1
137
Member Avatar for quaifp1

Hi, I have usually have 2 monitors available but not always. I use one for displaying maps and the other for the data on a called form. How do 1 get Maps on 1 and Data to appear on the other without dragging the form onto the second monitor. Thanx …

Software Development pascal
Member Avatar for BitFarmer
1
132
Member Avatar for StaticX

I am trying to make a small program which will write to a binary file,this is my code: [CODE]// program that writes to a binary file #include <iostream> #include <fstream> using namespace std; main() { fstream* bfile = new fstream("file.bin", fstream::out | fstream::binary | fstream::ate); int a = 2; int …

Software Development c++ file-system
Member Avatar for Nickg140143
1
271
Member Avatar for RobBrown

Hello, I have a program that decodes a substitution cypher one character at a time and then prints it on the screen. I need to save this text into a output file on disk. I am having hard time figuring out how to get the decoded text from the screen …

Software Development c++ file-system
Member Avatar for Ancient Dragon
1
122
Member Avatar for eswar.aspire

hi, Can any one help me about clock problem..i need to calculate the exact execution time of algorithm using the processor clock speed not the wall clock time..i am getting zero by using the clock_t function in time.h.also how can i calculate the exact processor speed execution of program..reply me …

Software Development algorithm c
Member Avatar for AuSsIeStOnE
1
102
Member Avatar for Stefano Mtangoo

[QUOTE]Win32++ is a small C++ library used to build windows applications. It has been designed to be easy to use, and simple to understand. It is an ideal starting point for anyone learning to program for windows using C++. Win32++ also has the added advantage of running on a wide …

Software Development c++ visual-studio
Member Avatar for Stefano Mtangoo
1
214
Member Avatar for gauravkr

#ifndef _READFILE_H_ #define _READFILE_H_ #include<string> #include<vector> #include<map> using namespace std; class Readfile{ private: string str; vector <string> goArray; vector <string> strArray; vector <string> phyIntArray; vector <string> subArray; vector <string> proArray; /* member function */ void processString(string str); void processGoId(string); void processPhysicalInt(string); // void processMetabolicInt(string); public: typedef struct Info{ string uniprotID; …

Software Development c++
Member Avatar for gauravkr
1
188
Member Avatar for debasishgang7

how to send email via smtp server like gmail with c++??????? i want the code if any web resources available pls provide..

Software Development c++ email web-server
Member Avatar for rahul8590
1
131
Member Avatar for BosByte

Hello, Please take a look at this well-known 'problem': [CODE]class A{ B * foo(); }; class B{ A * foo(); };[/CODE] Its solution is simple: add "class B;" above A. But I've got a smilar, but more complex, problem: [CODE]class A_1 { virtual B_1 * foo(); }; class B_1{ virtual …

Software Development c c# c++
Member Avatar for StuXYZ
1
110
Member Avatar for jigglymig

everything works except I need it to give me the max and min month (i.e. 1,2,3..12) instead of the number entered into the array. #include <iostream> using namespace std; int main() { const int SIZE = 12; double months[SIZE]; int count; double sum = 0; double totalRainfall; double averageMonthlyRainfall; double …

Software Development c++
Member Avatar for donaldw
1
123
Member Avatar for msc1004

I've been trying to figure out this problem for a week. I've searched all sites for if else statements, and I can't figure out why !!!!!!!!!!!!!!!!! What's wrong with my statements ?? Help me out !!!!!!!!!!! please. #include<iostream> #include<string> using namespace std; void main() { char hsg; //Highschool Graduate char …

Software Development c++
Member Avatar for donaldw
1
92
Member Avatar for birdhouse

Hello I need to write a c++ program that requires a function called DeleteRepeat and prompts the user to input the name of a text file and outputs the new data in a new file. For example, the content of the text file that the user inputs is " b …

Software Development c++ file-system
Member Avatar for basketball4567
1
116
Member Avatar for pankaj.garg

Need help for creating an diary alphabetically...some doubts 1. Do i need to create separate recordset for each alphabet (A-Z) ? 2. How do i get the 1st letter of the name entered into a textbox ? (hav heard that "VB Controls" help...but couldnt find a control to help me..) …

Software Development visual-basic
Member Avatar for akhileshbc
1
125
Member Avatar for Jfunch

i keep getting these errors with my program and i was wondering if anyone can help. /tmp/cc2Rxau2.o: In function `main': prac.cpp:(.text+0x101): undefined reference to `Barcode::Barcode()' collect2: ld returned 1 exit status Code: #include <iostream> using namespace std; class Barcode { public: Barcode(int zipcode); Barcode(char bar); Barcode(); int convert(int num); private: …

Software Development c++
Member Avatar for jonsca
1
93
Member Avatar for kgomes

In an assignment for class we have to ask the user how many characters they'd like to enter and then read the characters into an array of that size. I've had problems with calling a function to do this. I will also be passing this array to other functions, so …

Software Development c
Member Avatar for gerard4143
1
96
Member Avatar for tkud

Hey,everyone... I am having a hard time sitting in front of my pc and learning templates all by myself... I need help, in any form(explanations, examples,online help,etc). Please,any help will be appreciated..Thanks!! [QUOTE]"Show me your code and I will tell you who you are.."-Tkud[/QUOTE]

Software Development c++
Member Avatar for mrnutty
1
82
Member Avatar for pmee

Hi, I'm new to this site so apologies for any mistakes. I'm trying to write a program to parse string from a file. In each string I then have to parse the different strings for example: add h'13', 4 So I've to parse the 'add' bit, the '13' bit and …

Software Development c
Member Avatar for pmee
1
102
Member Avatar for red999

So I am creating a program for a class that reads in from a file the appointments. The file has this format Date,Subject,Start Time,End Time,Location,, The interesting thing about the file is that it does not contain the same appointment (same name, location, and time) more than once. For example: …

Software Development c++
Member Avatar for red999
1
100
Member Avatar for d7o0om

hey, how's everyone, i need help with a java program, i'll appreciate any help. i'm need to write a program in java that will test if the input is a Palindrome or not. i found a couple of programs, but they use a (do-while) loop which i'm not allowed to …

Software Development java queue
Member Avatar for Ezzaral
1
354
Member Avatar for Philly0494

Okay, so I have to execute a batch command on a restricted user's account, however the batch command will not work unless the process has Administrative Privileges. currently i call the batch command via [CODE]system("command here");[/CODE] I, as the programmer, know the Administrator user/password on the WinXP machine this is …

Software Development c++
Member Avatar for Ancient Dragon
1
109
Member Avatar for A_Dubbs

Hey guys, I was wondering if you could clear up some things on classes for me. I have had a semi-easy time understanding python and programming concepts up to this point but now am having a real tough time on classes. I think it is because my book uses long …

Software Development python
Member Avatar for bumsfeld
1
232
Member Avatar for Benderbrau

Hi guys, I've searched this, but can't find a solution. Basically what I'm doing is writing a binary search tree (which works) and balancing it with AVL (which almost works). As far as I can tell my AVL tree is implemented correctly, but I'm getting a stack overflow error at …

Software Development data-structure
Member Avatar for Geekitygeek
1
596
Member Avatar for leeba

I am trying to write a program that accepts a dollar rate and hte accepts a list of amounts adn converts tehm to Shekels and prints in a list with the sums. HEre si my code: It is giving em lots of errors and I am having no luck. I …

Software Development c
Member Avatar for leeba
1
91
Member Avatar for adiaforos

Hello all!! i have to make a program for my university that generates 3000 random numbers and finds the one who are powerful! I have written all of the code but i don't know what condition is wrong! let me show you... :-P [CODE]for (l=4 ; l < COMPUTATIONS ; …

Software Development c
Member Avatar for adiaforos
1
170
Member Avatar for vansoking

[CODE]#! /usr/bin/env python #filename:pwd.py # development environment:python2.51 import getpass usr=getpass.getuser() while True: pwd=getpass.getpass("passwd:%s:" % usr) if pwd=='123': print "welcome to python!!!!" break else: print "The password you entered is incorrect" [/CODE]

Software Development python
Member Avatar for vansoking
1
399
Member Avatar for Wong23

Can someone help me with this problem here about Binary Trees. I was given this code... and I am required to write a function void count_nodes(?) to determine the total number of nodes in a Binary Tree.

Software Development c++
1
244
Member Avatar for Ashishinani1756

i ve two directories and i ve to write a c++ code for getting files names of both the directories printed side by side .(Assume equal no.of files in both directories)

Software Development c++
Member Avatar for Ashishinani1756
1
109
Member Avatar for Ryujin89

Figure I might as well go ahead and clear up that this is obviously a school assignment. I have completed a somewhat decent amount of code (not saying I have a lot of faith in it's correctness tho) and need assistance to figure the rest out. I'm at a complete …

Software Development c++ ios
Member Avatar for Ryujin89
1
196
Member Avatar for derekn

I want to search "The tree is in the yard" for the word "the", then replace the word "the" with "<font color=#FFFFFF>the</font>", which I currently do with "s/$searchstring/<font color=#FFFFFF>$searchstring</font>/gi;" BUT I want to preserve the case of the word, so that in this example the first word of the sentence …

Software Development perl
Member Avatar for derekn
1
99
Member Avatar for dmm

can I open a file and then close it in a loop? I tried but it doesnt seem to work. :(

Software Development c++
Member Avatar for shakunni
1
94
Member Avatar for xfriendsonfirex

I'm rather new to Java, and I can't quite figure out what to do with this program. Any help or suggestions would be greatly appreciated. Thanks in advance. File Account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance …

Software Development java
Member Avatar for xfriendsonfirex
1
831
Member Avatar for imolorhe

I was just wandering about the user interface of C applications. What are the basic things one should know about programming a graphical user interface with C.

Software Development c image user-interface
Member Avatar for jbennet
1
105
Member Avatar for atch

Hi, Is it possible to have class template in non template class? I'm trying something like this and I'm getting errors: [code=c++] class Non_Template { //...other stuff public: template<class T> class some_Template; //declaration }; template<class T> //something WRONG with this syntax Non_Template::some_Template { }; [/code] Err msg I'm getting: error …

Software Development c++
Member Avatar for atch
1
110
Member Avatar for vegaseat

Python can use its COM support and the OCX of the WindowsMediaPlayer to play mp3 music files. Make sure that your Python installation has the win32com folder. Check [url]http://starship.python.net/crew/mhammond/win32/Downloads.html[/url] for the latest win32com support. [COLOR="Red"]This code relies on file WMPlayer.OCX which MS has removed on newer versions of Windows. See …

Software Development python
Member Avatar for vegaseat
1
2K
Member Avatar for guccitan88

Hi! I'm really new to C++ and posting to forums so please excuse any mistakes I may make. I have to write a program that simulates throwing 2 die and printing their sum 25 times, seven sums per line. I'm stuck on the "seven sums per line." Do I need …

Software Development c++
Member Avatar for guccitan88
1
2K

The End.