43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for mcap61

Hey guys, I'm trying to write something to a .txt file from within my program using ofstream. I have this function names show_results() which is a bunch of cout statements that are connected to a class and a bunch of member functions. But the function show_results is all cout statements. …

Software Development c++
Member Avatar for jonsca
0
94
Member Avatar for samsons17

i not sure what is the single quote means... the example like this : if (value=='a') Thank you 4 helping :)

Software Development c++
Member Avatar for mrnutty
0
80
Member Avatar for COKEDUDE

Right now my code runs just the way I want it to. I would like the [CODE]Enter a sentence or phrase[/CODE] part to continue until the user enters "quit". I would like to use a while statement. Every way I have tried to enter phrase not equal to "quit" has …

Software Development java
Member Avatar for COKEDUDE
0
199
Member Avatar for Ri0o

hi, i'm new in python programming i'm trying to write a simple program that processes a text file containing grades for a class, extracts the desired grades, count the number of grades in each grade segment and genrate a pie chart for grades,(A1) . [url]http://pages.cpsc.ucalgary.ca/~zongpeng/CPSC231/assignments/A3/a3.pdf[/url] any help would be appreciated …

Software Development pdf python
Member Avatar for Ri0o
-1
124
Member Avatar for kool.net

hi, i have a mdi form named MDIParent2 in my application and it has many child forms. child form 1 named frmClient has 3 child forms now i want to call them in MDIParent2. can any one tell me how to i call sub child & sub - sub child …

Software Development
Member Avatar for kool.net
0
132
Member Avatar for Bunda350

ran into a problem i know this is asking for me to calculate the product of a coulmn and row but im not sure where to begin. I know that rowData tells us the value in a row and nRows specifies the number of rowData and the same with nCols …

Software Development c++ matrix-multiplication
Member Avatar for axed
0
211
Member Avatar for OSiRiSsk

Hello, is me again, im trying to improve my program with another function it should print as many senteces on one line in the output, as user will enter as the parameter in the command line sentenece is characterized with sign '.' if you have sentences wchich ends with '...' …

Software Development c
Member Avatar for automart
0
151
Member Avatar for jesseb07

hey, had a question that I couldn't figure out. I'm writing a program for linux and I need to save things to a person's Desktop. Because of that, I need to know their username. I am aware of the linux commands whoami, id, etc, but they only print the current …

Software Development c++
Member Avatar for jbennet
0
8K
Member Avatar for styles_p

[CODE][B] DataTable dt; private void Permissions_Load(object sender, EventArgs e){ dt = new DataTable(); dt.Columns.Add("Feature", typeof(string)); dt.Columns.Add("None", typeof(bool)); dt.Columns.Add("ReadOnly", typeof(bool)); dt.Columns.Add("ReadWrite", typeof(bool)); datagridview1.Datasource=dt; } private void btnSave_Click(object sender, EventArgs e){ [COLOR="Red"]in the grid when i'll click on the any checkbox i want to pass parameter to this function [COLOR="Green"]SetPermission( , , …

Software Development
Member Avatar for DdoubleD
0
180
Member Avatar for sravan953

Hey All, I have some code here, the problem is in line 82-83: [code='python'] import smtplib import wx window=wx.App() class pymailer(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"Py-mailer",size=(500,700)) try: self.s=smtplib.SMTP("smtp.gmail.com",587) self.s.starttls() except: wx.MessageBox("Error 001: Could not connect to the internet, please try again later.","Internet Connection Error") self.panel=wx.Panel(self,-1) menubar=wx.MenuBar() filem=wx.Menu() filem.Append(201,"Quit") self.Bind(wx.EVT_MENU,self.Quit,id=201) viewm=wx.Menu() viewm.Append(202,"About") self.Bind(wx.EVT_MENU,self.About,id=202) …

Software Development python wordpress
Member Avatar for pythopian
0
619
Member Avatar for shaan07

Hei..i am novice to programming. How to generate beautiful html pages from a text file. My idea is to generate XML first and then generate it to html. Generated html page should contain all the information that the text file contains..like tables,pics,body,headings. I dont have a clue what to do …

Software Development html-css python xml
Member Avatar for pythopian
0
132
Member Avatar for axed

I wrote a program to solve a system of linear equations. It works fine with the VS compiler. But when I try to run it using Cygwin, I get a seg fault(core dumped). But it does not say where the seg fault is. I am using the following commands: to …

Software Development c++
Member Avatar for axed
0
370
Member Avatar for efecto

I wouldl like to query a date of when a photo was taken.. how may I do that?

Software Development python
Member Avatar for efecto
0
248
Member Avatar for eggmatters

Not really sure how to phrase the question. Essentially my issue is this: I have a Form that when the user clicks a button, it invokes a JFrame that populates a datatable with a sql query. The datable frame also has a button. The user can select a cell in …

Software Development java java-swing
Member Avatar for Ezzaral
1
138
Member Avatar for dima shawahneh

Hello every one.. I have this exception while trying to execute an insert command into a simple sql database [CODE] string myChar = charNameTextBox.Text; string command = "insert into data (char,Entropy,Uniformity,stadev,smoothness,skewness,kurtosis) values(" + myChar + "," + entropy + "," + uniformity + "," + standardDeviation + "," + Smoothness …

Software Development
Member Avatar for dima shawahneh
0
159
Member Avatar for simpatar

This is my program: [CODE]def main(): print('This is a program to calculate the setprod') print() userinput = input('Enter two sets separated by a comma: ') value1, value2 = userinput.split(',') mylist1 = eval(value1.strip()) mylist2 = eval(value2.strip()) print(mylist1 + mylist2) main()[/CODE] If I enter following: [CODE]>>> This is a program to calculate …

Software Development python
Member Avatar for simpatar
0
107
Member Avatar for apo

Hi, I'm trying to create a quick and small programs that works when you press F9, it should create files on my desktop using "ofstream" from A to Z. I can't get it to run when i put ofstream in a [B]for[/B] cycle. Here is the code to see it …

Software Development c++
Member Avatar for niXman
-1
186
Member Avatar for abhaymv

I am a student in C++.We undertook a school project to develop a library information system.We are only allowed to use Turbo C++ version 3 compiler.We cannot use ANSI/ISO C++(Not in our syllabus.)The following is my problem: In my project, I have a class books.When the program is first run, …

Software Development c++ ios
Member Avatar for abhaymv
0
193
Member Avatar for Mouche

So, I created this fun little Tic Tac Toe game all on my own. It was a tough project, and I know I used some inefficient strategies in the coding. Just like the other things I've posted, this could use a lot of suggestions in the areas of clean code …

Software Development python
Member Avatar for vegaseat
0
1K
Member Avatar for Q8iEnG

Hi mates.. I'm trying to find a way in how to inputing or outputting from a file in Java. For my bad luck when I finished my Java course, our professor didn't talked about this thing. I searched in the internet, and found a way in inputing from a file …

Software Development file-system java
Member Avatar for Q8iEnG
0
196
Member Avatar for Web_Sailor

Hi, I am working on creating a jradiobutton group using JTable. Here is a brief definition of the problem. My program gives an output like this:- [CODE] Questions Answers 1 radiobtn1 radiobtn2 radiobtn3 2 radiobtn1 radiobtn2 radiobtn3 3 radiobtn1 radiobtn2 radiobtn3 [/CODE] I am able to set horizontal control that …

Software Development java java-swing
Member Avatar for peter_budo
0
528
Member Avatar for en1gmat1c

ok so im a new programmer and im making a tic tac toe program and i got this error `"operator && cannot be applied to boolean,java.lang.String"` in the crazy long line in the winner method and am not sure how to fix it import java.util.Scanner; import java.util.Random; public class tictactoe …

Software Development java
Member Avatar for theStruggler
0
166
Member Avatar for crazyboy

Hello every one ... I need help to make connection between two PC through socket programming ... in which scenario i want connection is as below ... there are two networks on different places.One network having internet connection of COM1company and through that one connection only other PCs are getting …

Software Development socket-programming
Member Avatar for crazyboy
0
142
Member Avatar for samsons17

Hi.. This is my program for my assignment.. So far,I've succeeded in coding the program but not for the last part.. I still need to find the total sale for this program... and the result at the end suppose to be more or less like this : Total sale : …

Software Development c++
Member Avatar for samsons17
0
89
Member Avatar for freakgamerz

Hello, I am beginner with c++ programming and I need help with this source. I tried to find a way for getPrintDetails to not print a infomation. //Course: 4002-208 //Author: Joseph Dalpra //Topic: Functions //Name: project4.cpp //Purpose: Using functions to shorten repeated code // Play the game of craps for …

Software Development c++ gaming
Member Avatar for Clinton Portis
0
188
Member Avatar for Shinedevil

I need to have a function like this: if (x == 1){ ... } do some amazing things. I need it to check to see if x == 1 through 380 or more. But I really don't want to waste 4 hours doing this: if (x == 1 || x …

Software Development c++
Member Avatar for Clinton Portis
0
141
Member Avatar for npn_

Sorry if this is a really easy question, but I've been going through control flows in the python documentation and something confuses me that it doesn't address. [CODE] a = ['Mary', 'had', 'a', 'little', 'lamb'] for i in range(len(a)): print i, a[i] [/CODE] When I type that in, it prints …

Software Development python
Member Avatar for npn_
0
88
Member Avatar for Instinctlol

So I need to find the highest and lowest for some numbers I am storing into struct [code=c] #include <iostream> #include <string> using namespace std; struct WeatherStation { string StationDesignation; double Temperature; } CA, FL, NY; // EXAMPLE, I WILL ADD A LOOP FOR FL AND NY int main() { …

Software Development c++
Member Avatar for Clinton Portis
0
506
Member Avatar for Krstevski

Hello guys, can someone tell me how can I get the values from the columns ? My sql table is: Table name: settbl Table columns: id, first (int), second (int) ...and now, I want to get the values from "first" and "second", but I got the error message "Object reference …

Software Development open-source sqlite
Member Avatar for Krstevski
0
4K
Member Avatar for Aild

From what I've googled, it seems like symbol reference errors are linking errors.. If I am wrong, please let me know. I'm trying to make a very simple program(DataReader.cpp) that takes inputs from a text file and saves them in a form specified in Data.cpp/Data.h. But I keep getting symbol …

Software Development c++
Member Avatar for Aild
0
186
Member Avatar for Phillipsmc

Hello everyone, I'm new to the forum and new to C++, or any programming for that matter. I've been trying to create suite of 4 functions one of which takes a string and converts it into an integer. I'm aware of the atoi function but we are not supposed to …

Software Development c++
Member Avatar for Phillipsmc
0
85
Member Avatar for zyrus001

Having worked with txt files, I'm learning about binary now. My code below works for a while then bombs out, can you point me towards a method or module to read binary data line by line? The crypto module requires a buffer (don't know how to create one of those) …

Software Development python
Member Avatar for mn_kthompson
0
556
Member Avatar for godsgift2dagame

Hello Daniweb, This is my first official "help" thread. I'm currently attempting to read a file that has the following code: [CODE]8 split 1 9 1 spare 7 2 10 strike 8 2 spare 6 split 2 7 3 spare 10 strike 10 strike 10 turkey 8 1[/CODE] and have …

Software Development c++
Member Avatar for godsgift2dagame
0
186
Member Avatar for eddy_boy

Hi, Any advice please. I have various forms (e.g. frmCustomers, frmProducts), each having bindingSources and tableAdapters. The forms have the required Fill methods triggered from their constructors. It appears that the DataTable filled only exists in the App for as long as the form does. What I want is a …

Software Development dataset
Member Avatar for sknake
0
1K
Member Avatar for pdxwebdev

[CODE] def doKey(e): print(e.widget.get("1.0","end")) root= Tk() root.title('yada') txta = Text(root, width=40, height=10) txta.bind("<Key>", doKey) txta.pack(side=LEFT) root.mainloop() [/CODE] Pressing a key in this text area will always output the string prior to your pressing the key. Am I missing something?

Software Development python
Member Avatar for pdxwebdev
0
144
Member Avatar for BattlingMaxo

I am a complete newbie to python but know some c++ Was wondering where i can get my hands on a 3D script for schooling(like fish) BattlingMaxo

Software Development python
Member Avatar for vegaseat
0
95
Member Avatar for cole davidson

Hi guys. I am trying to write a program that asks the user how many test scores they have, then reads the test scores, averages them, then displays the average and a pass/fail grade (50+ is a pass), using a seperate function to average the input values. I have been …

Software Development c++
Member Avatar for cole davidson
0
614
Member Avatar for masterofpuppets

hi all, I am designing a text editor program in Python using Tkinter and I was wondering if there's any way to get the current line number when the mouse is clicked somewhere on the text field, i.e the mouse position should determine the current line, like in the python …

Software Development python tkinter
Member Avatar for masterofpuppets
0
962
Member Avatar for BenJammin89

simple little program from a book. One of the exercises is to modify it to use displayMessage to output the "Welcome" message and the name of the Professor. Problem is everytime I do it the name of the Course and the professor are the same. What am I doing wrong? …

Software Development c++
Member Avatar for BenJammin89
0
81
Member Avatar for M.Jama

I'm too new in java and I always appreciated when you share with me your knowledge. Here I'm trying following self-test exercise; Give two declaration for two variables called feet and inches.Both variables are of type int and both are to be initialised to zero in declaration. I try this …

Software Development java
Member Avatar for javaAddict
0
1K
Member Avatar for mcmillan0520

Hi, In my app I have a group of checkboxes which represent different settings. I want to be able to load and save these settings into the program, and that works just fine. However I'm having trouble updating the checkboxes to show the settings. If I load the settings, only …

Software Development
Member Avatar for DdoubleD
0
176
Member Avatar for Israelsimba

i have created a database for subscriptions in MS Access 2007. I want to link it with my forms using the code below but its saying unrecognised database format. [B]Dim conn As Connection Set conn = New Connection conn.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\subscriptions2.mdb".......[/B] Now i have converted it to Access 2000 format …

Member Avatar for AndreRet
0
165
Member Avatar for Whilliam

Hello. I've been trying to solve this problem but I can't and my head hurts already. Please help me. [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> #define max 12 #define num 30 #define nam 24 typedef struct { char name[nam]; int score; int rank; }CONTESTANT; typedef struct { CONTESTANT CA; int next; …

Software Development c storage
Member Avatar for Whilliam
0
403
Member Avatar for UKmason

This is what I have of my code so far but I cant get it to work right, Can someone help me fix this I need to make a float function that converts celsius to fahrenheit but im not totally sure how to do it I also need to make …

Software Development c++
Member Avatar for restrictment
0
134
Member Avatar for prelyptica

I an trying to write a few java classes, which I wrote successfully, but when I am tryin to test it I get some weird errors and I cant figure out why, so i'd be very grateful for your expertise. The code for the GCD class is: [code] public class …

Software Development java
Member Avatar for thines01
0
195
Member Avatar for restrictment

Hey, I am just learning functions. I was wondering if you could tell me why this piece of code is not implementing the 'values' function. [code] #include <iostream> #include <windows.h> #include <string> #include <iomanip> void values(float value1[11]); using namespace std; float value1[11], value2[11]; int main() { cout << setiosflags(ios::fixed) << …

Software Development c++ ios
Member Avatar for restrictment
0
126
Member Avatar for ryno365

Hey DW. Working on a nice poker application and need some help. Right now I'm trying to go through two arraylists, one of chars and one of sorted ints (representing the suites, and numbers of the cards) and delete duplicating numbs (and the char/suite counterpart in the other array). In …

Software Development java
Member Avatar for ryno365
0
100
Member Avatar for kenmeck03

Write a function called NumDistinctDict that takes a single parameter alist that determines the number of distinct values in alist. For example, the list [1,2,4,2,7] contains 3 unique values (namely 1,2,4 and 7).

Software Development python
Member Avatar for vegaseat
0
114
Member Avatar for Zaffron

So I want to make a class based RPG, as a project to help me understand how classes work. Unfortunately, I didn't get far. The below code is intended to make an instance of a character and have info in it like name, health, gold, exp, and the like. I …

Software Development python
Member Avatar for vegaseat
0
75
Member Avatar for lewashby

How do you know when to use a function by wraping the content between parentheses "function(x) or through dot notation x.function() ? thanks.

Software Development python
Member Avatar for masterofpuppets
0
161

The End.