132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for zhinokin

Hello, i need a little help with this code. it's a header file personal.h [CODE] #include <iostream> #include <fstream> #include <cstring> using namespace std; #ifndef PERSONAL #define PERSONAL class Personal { public: Personal(); Personal (char*,char*,char*,int,long); void writeToFile(fstream&)const; void readFromFile(fstream&); void readKey(); int size() const { return 9 + nameLen + …

Software Development c++
Member Avatar for zhinokin
0
604
Member Avatar for rickster11

I want my user to be able to enter a fraction. I could be lazy and just take num and denom separate... But I was wondering if there is way I can allow user to enter a fraction like "3/4". And somehow ignore the '/'. I guess I could take …

Software Development c++
Member Avatar for vijayan121
0
121
Member Avatar for rockstat

Hello Everyone I am new to this forum and hope I can get some help and vice-versa. I am doing this little project for my self in C Sharp and it involves WMP. I have provided my code at the bottom and appreciate any help I can get. I am …

Software Development file-stream
0
130
Member Avatar for thebigbroski

I was working on Problem 17 on Project Euler: [url]http://projecteuler.net/index.php?section=problems&id=17[/url] and I'm stuck; my answer is close, but not correct. I got the answer 21108 with the following code: I do realize the code can be optimized, but I would like to simply get this to work, and not try …

Software Development java
Member Avatar for thebigbroski
0
527
Member Avatar for abarrett86

I have a C#.NET Website that stores status logs from hardware installations. A report is stored in a report_info table and it's data entries are stored in report_data. I first insert into the report_info table and retrieve the insert ID using: [CODE] cmd.CommandText = "SELECT @@IDENTITY"; // Get the last …

Software Development
Member Avatar for abarrett86
0
159
Member Avatar for JudeV

• Enter a do-while loop and generate a random, byte-sized, value in the range of 0 to 255. Store the random value in a variable of type byte. Display the value in hex as shown below. • The user will input a string containing 1's and 0's. Use a do-while …

Software Development
Member Avatar for Momerath
0
109
Member Avatar for mzittlow

I am creating a scrolled frame object within Tkinter. My current approach is to have a frame embedded within a scrolling canvas. I have seen numerous examples of this technique but they have one common 'flaw'--the frame's contents are loaded and then the controlling canvas's scrollregion is set. In my …

Software Development html-css python tkinter
0
201
Member Avatar for CHOCHOCHO
Member Avatar for CHOCHOCHO
0
87
Member Avatar for doublecheck

Hello all, I'm new to programming and I came across the practice problems thread and tried one of the beginner ones: "Make a program that allows the user to input either the radius, diameter, or area of the circle. The program should then calculate the other 2 based on the …

Software Development c++
Member Avatar for doublecheck
0
157
Member Avatar for 24x24

First off: I am not looking for somebody to do my homework. Although it would make it easier for me in the short term, please don't "help" me by writing my code for me. I would rather lose points for being late and understanding the code than get the grade …

Software Development java programming-construct
Member Avatar for peter_budo
0
138
Member Avatar for enkidu75

I am trying to make a program for class which is circular so it can be used until the user is done. the idea is choose an option then it calls the function, but for some reason it calls the estimate screen even when main_input does not equal 2. I …

Software Development c++
Member Avatar for peter_budo
0
109
Member Avatar for medopunsher

Hello all , Is there an algorithm for computing Very large numbers (Max 9^1000000) without BigNum ??? Thanks in advanced.

Software Development algorithm c++
Member Avatar for arkoenig
0
109
Member Avatar for nalbertini

Hi People, When creating this program, I am trying to add a while loop so that I can continue to pull in input from the user until they put a -1 for the input. This is the error I get. java:46: cannot find symbol symbol : variable input location: class …

Software Development java
Member Avatar for peter_budo
0
210
Member Avatar for andimiami

Hello! I need a little more help. I have managed to convert all my chars input from a text file into digits. Example: Input from file: $1,9,56#%34,9 !4.23#$4,983 Output: 1956 349 423 4983 Now, I need to take those individual digits the 1 9 5 6 and make it read …

Software Development algorithm c++
Member Avatar for mrnutty
0
209
Member Avatar for plang007

Here is my code: #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { char fare; char choice='Y'; int hrIn, minIn, hrOut, minOut; int hours; int minutes; int total_minutes; double cost; float charge; float additionalTime; while(choice=='Y'||choice=='y') { cout << "\nThis program will calculate a single, couple, or group …

Software Development c c# c++
Member Avatar for Software guy
0
192
Member Avatar for joelem

Hello everyone, I have successfully WRITTEN an array of complex numbers into .txt file using fprintf and scanf(). However, I have no idea how to READ this file. Please see the attached code and reply with your suggestions. Thank you in advance!! Joelem [CODE] #include<stdio.h> #include<stdlib.h> #include<math.h> #include<complex.h> int main() …

Software Development c
Member Avatar for Adak
0
1K
Member Avatar for Oblivious21

hey everyone this is my situation. i am taking a programing course that introduces you to a few languages. the first one is C now im a java guy (not very good with it yet) im still learning but i understand the basic concepts so im not totally in the …

Software Development c data-structure machine-learning unix
Member Avatar for Oblivious21
0
265
Member Avatar for jember

I need immediate help here. Please help me! :) I just can't figure out why my program is crashing while executing it. The compiling of the program is fine. (no syntax errors) I used Dev C++ 4.9 for this version. [QUOTE][CODE] #include <iostream> #include <conio.h> #include <iomanip> #include <string> using …

Software Development c++ visual-studio
Member Avatar for jember
0
159
Member Avatar for lexusdominus

i would never ask for debugging help usually but i am totally lost and have wasted far too much time on this. both peices of code compile correctly. the original function works fine with my program and the second one crashes. the original code checks a textfile in the root …

Software Development c++ ios
Member Avatar for lexusdominus
0
319
Member Avatar for fpsasm

Hello, I am writing a section of c++. Here is the section that does not work: [code=c] int a, escape; double temp1,temp2; escape = 0; a = 0; while(escape < 2){ Complex c[a]; cout << "Please input a complex number, the real part follwed by the imaginary part.\n"; if(!(cin >> …

Software Development c++
Member Avatar for fpsasm
0
115
Member Avatar for hkus10

1) Is there any way to split ['a', 'b c'] into ['a', 'b', 'c']? 2) db = [["a", "b", "c"], ["apple", "bean", "cat"]] lines = sys.stdin.readlines() for i in range(len(lines)): lines[i] = lines[i][:-1] for i in range(len(lines)): for j in range(len(db[0])): if lines[i] == db[0][j]: print db[1][j] else: print lines[i] …

Software Development apple python
Member Avatar for woooee
0
102
Member Avatar for StevoLord

Okey now the problem is that if the previewFrame is set to the default layout the buttons show but since it is using a layout manager the setBounds,setLocation,setSize commands dont work. So I used the code previewFrame.setLoayout(null) which would let me set my own position of the buttons on the …

Software Development java java-swing
Member Avatar for StevoLord
0
146
Member Avatar for blee93

Hi, I wrote this code for C++ Primer Plus, but I don't really get why it doesn't work. [CODE]#include <iostream> #include <cctype> using namespace std; int main() { char ch; string str; int vowels = 0; int consonants = 0; int others = 0; cout << "Enter words (q to …

Software Development c++ perl
Member Avatar for Red Goose
0
226
Member Avatar for holocron

Greetings all DaniWeb people, long time no see. I have a (hopefully) easy question. Let's jump into the code. My test harness: [CODE] cout << "--------------------------------------------------------" << endl; cout << "Begin Copy Constructor Testing" << endl; cout << "--------------------------------------------------------" << endl << endl; dlSL = new DLSortedList(); for (int i …

Software Development c++
Member Avatar for holocron
0
243
Member Avatar for Oblivious21

Hey guys and gals I need alittle help. i have an assignment that needs to print a certian number of stairs according to a user input. Example program run (user input is in bold): Please enter the number of rows: 4 Please enter the number of stars in row 1: …

Software Development java
Member Avatar for Oblivious21
0
165
Member Avatar for LevyDee

Are static variables allocated in the heap or on a thread specific stack. Thanks

Software Development c++ google
Member Avatar for LevyDee
0
79
Member Avatar for alex9292

hi i have a project to do for school and im not sure if im on the right track i would like some opinions here is the description of what i have to do [U]INSTRUCTIONS Part A 1. Start a new C# project named SalespersonDemo.cs, as shown in Exercise 9 …

Software Development
Member Avatar for Momerath
0
165
Member Avatar for dimProg

Hello, I'm new to c++ and we're just starting classes and objects in class. I've done a bit of programming in Java and I'm struggling to initialize an object using a variable. I must be missing something fundamental but I can't for the life of me figure it out. Here's …

Software Development c++ oop
Member Avatar for rickster11
0
1K
Member Avatar for xxxferraxxx

Hi, I wana to make keygen that not randomly codes, and with 2 text boxes, Like i need to add "username" and "password" to gen for me I need the code please help :)

Software Development c
Member Avatar for Moschops
0
110
Member Avatar for revjim44

I have a form that has two text boxes. The first is visible, and the second one is not. How do I go about having the second text box become visible if the user tabs out of the first text box? I wrote a KeyDown event handler to check for …

Software Development
Member Avatar for ddanbe
0
204
Member Avatar for carlitosway17

I am creating a C# forms application, a gradebook in particular everything is fine except I keep getting this error : [COLOR="Red"]cannot convert type string into int[/COLOR] Here is my code [CODE] // Fig. 18.9: CreateFileForm.cs // Creating a sequential-access file. using System; using System.Windows.Forms; using System.IO; using GradeBook; public …

Software Development
Member Avatar for carlitosway17
0
1K
Member Avatar for Sundayy

[B]I'm new to C++ and I need help in writing code:[/B] Lucy likes to jog in the morning. As she jogs, she counts the number of strides, she makes during the first minute and then again during the last minute of her jogging. She then averages these two numbers together …

Software Development c++ ios
Member Avatar for Sundayy
0
169
Member Avatar for carlitosway17

Hi we are supposed to modify this class for my school project to create a code that will print out a rectangle made of asterisks * something like ********* * * * * * * * * * * ********* here is my code [CODE] // Exercise 7.21: TurtleGraphics.java // …

Software Development java
Member Avatar for carlitosway17
0
171
Member Avatar for dasatti

I started developing an HTML editor using Java. After spending a lot of time I am now stuck in between. Most of the things are done but now I don't find any way to implement some of very important features. [B]I think[/B] java is too weak too support these features. …

Software Development image java java-swing
0
107
Member Avatar for zeeya

Hello.. I'm new with java and have some problem with my assignment. I want to write a class named phoneBookEntry that has field for a person name and phone number. The class should have a constructor and appropriate accessor and mutator method. Then, write a main class that create five …

Software Development display java oop
Member Avatar for peter_budo
0
1K
Member Avatar for SubGrizzly

Ok, I'm just starting to learn C#. It will be my first language I am learning. I start my degree in Software Engineering on the 22nd. I'm required to take two Java courses and two VB courses. I don't really want to develop in either of them. I've played with …

Software Development engineering
Member Avatar for SubGrizzly
0
104
Member Avatar for draven07

..Hi to all...just want to ask.. ..I have already created an ideal layout for my calculator..my problem is...I dont know how to insert a value into a field everytime I press a button(0 to 9)..without deleting the previous integer after I press my operator.. ..how shall I do so..??..

Software Development java
Member Avatar for draven07
0
97
Member Avatar for jlego

kind of directed towards adatapost... in most of my applications, i have a public function called DBUpdate() [CODE] Public Sub DB_Update(ByVal strQuery As String) Dim ADOCmd As New ADODB.Command Try If ADOConnect.State = ConnectionState.Open Then Call CloseConnection() ADOConnect.Open(dsn, user, pass) ADOCmd.ActiveConnection = ADOConnect ADOCmd.CommandText = strQuery ADOCmd.Execute() Catch ex As …

Software Development vb.net
Member Avatar for jlego
0
152
Member Avatar for ajinkya112

Hey guys, need your help once again. I want to create a global variable in one form and then use it in another form. I need to know of it is possible. If yes, then how do we do it. Thanks And regards

Software Development
Member Avatar for Mitja Bonca
0
189
Member Avatar for medopunsher

Hello , The following function takes a number x and returns the sum of all numbers before n. For ex. when x = 5 the function should return 4+3+2+1. [CODE] unsigned long long rep(int x) { if(x==1)return 1; return x + (rep(x-1)%314159); } [/CODE] I'm getting a segmentation fault with …

Software Development c++
Member Avatar for medopunsher
0
91
Member Avatar for yeticannotski

Dear All, I am struggling to write my first "useful" python script, which is a backup tool. After hours and hours of trial and error, I finally got it to create two different lists. The first list is that of the files to be copied: [CODE]['C:\\Folder\\Foo.txt', 'C:\\Folder\\Folder1\\Foo1.txt', 'C:\\Folder\\Folder1\\Folder2\\Foo2.txt', 'C:\\FolderB\\FooB.txt', 'C:\\FolderB\\FolderB1\\FooB2.txt'][/CODE] …

Software Development python
Member Avatar for yeticannotski
0
3K
Member Avatar for SaberExcalibur

After deploying my project, I tried to install it on other pc , it installs well but whenever i run the .exe application my database file which is MS Access cannot be found. Well obviously the path is the problem. How would i make my path flexible and so that …

Software Development microsoft-access vb.net
Member Avatar for DONPAWPAW
0
110
Member Avatar for coco24

Is this a simple way to return the number of occurrences of theValue in a bag? [code] /** * Return the number of occurrences of theValue in the bag. */ public int countOccurrences( String theValue ) { // fill in code for(int index = 0; index <= topPosition; index++ ) …

Software Development java
Member Avatar for javaAddict
0
80
Member Avatar for Chair

Hi, I want to populate a listview with items from datagrid view. I've been searching for solutions but it seems that all the scenarios I found were about populating listview with items from tables in database, not from another listview or datagrid view. I'm trying this code: [CODE] For count …

Software Development listview vb.net
Member Avatar for Chair
0
1K
Member Avatar for haribasker

please help me import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.net.*; import javax.swing.border.*; /** * Summary description for userlogin * */ public class userlogin extends JFrame { public static ServerSocket ssoc1; public static Socket sousoc1,ss1; // Variables declaration private JLabel userlabel; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4; …

Software Development image java java-swing
Member Avatar for JamesCherrill
0
3K
Member Avatar for JGriffCS

I'm trying to create a class that reads in a set of numbers from a file, stores them in a generic array, and then sorts them using the generic bubbleSort method. I usually write in C++ and the switch from templates to generics hasn't been easy. I'm fairly certain my …

Software Development java
Member Avatar for JamesCherrill
0
704
Member Avatar for plang007

[CODE]#include <iostream> #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { char fare; char choice='Y'; int hrIn, minIn, hrOut, minOut; int hours; int minutes; int total_minutes; double cost; float charge; while(choice=='Y'||choice=='y') { cout << "\nThis program will calculate a group " << "\nfare amount which is then …

Software Development c c# c++
Member Avatar for rxlim
0
154
Member Avatar for water_ox

I need help with this assignment that I have to do. I am new to C++ programming and I do now know how to start this lab. Here is the instruction to the lab..please help.. COMP-122 Lab 6 Grade Arrays Objectives: • Use an organized, modular approach to develop programs, …

Member Avatar for jonsca
0
223
Member Avatar for swathys

Hi, can anyone guide me on [COLOR="Red"]how to check the server DateTime when the application launch. i want to make sure the user PC has the same DateTime as server when the user use the application.[/COLOR] Reason being is some user may tend to change their DateTime backward and it …

Software Development vb.net
Member Avatar for Luc001
0
136
Member Avatar for y2kshane
Member Avatar for Luc001
0
570

The End.