43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for prushik

Ok, I'm trying to write a little game in c++ using very simple graphics. not opengl or anything like that. Everything compiles fine (There are some warnings, i know how to fix them im just lazy, ill do it later) all of my code worked perfectly until i added the …

Software Development c++ opengl
Member Avatar for iamthwee
0
101
Member Avatar for lucamarcus

Am a new c++ programmer. I refer to the code " Bouncing Ball" which is a GUI, now there is a rectangle created, i managed to change the color the rectangle in the main window and what my may problem is how to make the rectangle fixed and not only …

Software Development c++ gui
0
98
Member Avatar for redaqen

Hey, again... I've got another assignment coming up and I'm having issues... again. Basically, my major stumbling block is figuring out how to set the int number = returned value of enterNewNumber. Also, is there any simple way I can store the digits of an integer as seperate numbers in …

Software Development c
Member Avatar for redaqen
0
137
Member Avatar for koketa

Hello eveyone, I am kindda new to daniweb. I was hoping that someone would give me some hints on where to put the running total and how to quit once the user types 0 for hours parked(my teacher asked for this feature) I would enormously appreciate the help! A parking …

Software Development
Member Avatar for koketa
0
161
Member Avatar for jliu66

Hi, My friends, I am new to python. I try to figure out how python knows the end of loop or the end of a block of codes in while... else code Here is the example: while E: Bt else: Bf here if Bf have 20 lines of code. How …

Software Development python
Member Avatar for Lardmeister
0
119
Member Avatar for atrix415

I am trying to print this to a dialog box. The code prints to console and prints, 1,2,3,4....12 to the dialog box. Can someone give me some advice on printing to a dialog box the verses to the dialog? [INLINECODE] import javax.swing.*; // program uses class JOptionPane public class TwelveDays …

Software Development java java-swing
Member Avatar for masijade
0
441
Member Avatar for jobs

what is %r mean? [code=python] "%r tag requires exactly two arguments" % token.contents.split()[0] [/code]

Software Development python
Member Avatar for vegaseat
0
90
Member Avatar for bumsfeld

Is there a way to limit size of a list in Python, so it does not use all memory?

Software Development python
Member Avatar for vegaseat
0
13K
Member Avatar for Koldsoul

I am having issues getting this function to work. This is a currency conversion program that gives the user choices of input of three other currencies other than USD and converts it. It is supposed to be a value returning function, not a void function. The program compiles, runs fine, …

Software Development c++
Member Avatar for Koldsoul
0
214
Member Avatar for zandiago

This is what I've got so far: [CODE] #include <iomanip> #include <cmath> #include <fstream> #include<string> #include<iostream> using namespace std; int main() { double numA=0; double numB=0; double productB; double accumulator = 0; cout<<"Your two numbers to multiply are?"<<endl; cin>>numA>>numB; double productA = (numA * numB); if (numA>numB||numA%2==1)//check if larger and …

Software Development c c# c++ printer
Member Avatar for zandiago
0
259
Member Avatar for pyramid

Hello - I am working on one of my labs, but I am having difficulty with the results being inconsistent. The passing by reference is working. I tested random data and I don't understand why some works and others produces incorrect results. Data tested: 5, 9, 7 = perimeter of …

Software Development c++
Member Avatar for pyramid
0
86
Member Avatar for dreammaker

How can I enlarge the size of the letters that will appear in a pictures box?

Software Development visual-basic
Member Avatar for dreammaker
0
105
Member Avatar for Amurka

My assignment is: "Write a program that accepts the letter grades for a student, calculates the student's gpa, and prints it out, along with one of the following five messages: Eligible Ineligible, taking less than 4 classes Ineligible, gpa below 2.0 Ineligible, gpa above 2.0 but has F grade (note: …

Software Development java java-swing
Member Avatar for Amurka
0
1K
Member Avatar for PL.P27

Hi Everybody, I was wondering if someone could help me figure out what is wrong with this part of my program. My program is a fraction calculator, and I'm wondering if the code I have is ok and if it will display correctly. Thanks much!! Also should I add a …

Software Development java
Member Avatar for PL.P27
0
178
Member Avatar for blacklocist

Hi all, I have been trying to drop a stored proc for sometime using SMO. I can create with ease but can't seem to drop. Any ideas? I thought it might be permission but for testing used SA account. No luck... [CODE] private void btnCreate_Click_1(object sender, EventArgs e) { SqlConnection …

Software Development c c# c++ sql
Member Avatar for blacklocist
0
339
Member Avatar for rcostheta

Hello, I am trying to pull the relationships from an Access database. I would like to know which fields have what type of relation with other tables in the database. Does anyone know how to do this? Thanks, Ben

Software Development vb.net
Member Avatar for rcostheta
0
119
Member Avatar for skalra63

ive posted this messge in 3 other forums, i hope i get a better response here. the following code has a button that removes the selected row from the grid. reset index, is what i am going to use so that the first column is always secquential, so all rows …

Software Development visual-basic
Member Avatar for troy183
0
131
Member Avatar for toolmanx

I didn't want to fill up a thread with a bunch of code, but I couldn't find a way to attach a file to an e-mail using this site's "send a message" system. I would have inserted the .CPP file. This is a basic windows program to run tests on …

Software Development c++
Member Avatar for toolmanx
0
133
Member Avatar for jackskell26

Hello Everybody. I am trying to write a program that asks the user to enter the amount of dice they want to use, and how many rolls they would like to make. Eventually I will need to store the output in strings, so I can print out how many times …

Software Development java
Member Avatar for jackskell26
0
156
Member Avatar for tracethepath

the last record is getting displayed twice.i hv rechecked everything and cudnt find the error. here is the add n display function. [code=c++] void add() { example abc; int n; ofstream file1("EXAMPLE.dat", ios::binary|ios::app); cout<<"Enter Number Of Records To Add "; cin>>n; cout<<endl; for ( int i = 0; i < …

Software Development c++ display file-system ios
Member Avatar for Narue
0
2K
Member Avatar for Fredszky

Hello Im new to C programming, im trying to learn how to create a textfile with whatever name the user of the program wants. something like this, please ignore that this code wont work, its just so you might understand how i am thinking: [code] FILE *file; printf("name of the …

Software Development c
Member Avatar for Fredszky
0
103
Member Avatar for toncoolx

Hello there, I need to write a function that insert new data into a text file, and I manage to do that, but only for the first row.... When I close my program, and reopen it to key in a 2nd input, it will simplely overwrite my 1st input. how …

Software Development c++
Member Avatar for toncoolx
0
222
Member Avatar for plusplus

Here I am again with my next sql problem. I'm not sure if I can use insert into for what I need. What I want to do is the following. My tables I have tblreminder with userid workid workdate I have tbluser with userid and username My textbox I have …

Software Development sql visual-basic
Member Avatar for QVeen72
0
438
Member Avatar for dreammaker

I f I enter the name of a any person in an InputBox and I want that name to appear in a MessageBox, who do I do this? Exmaple: If I enter Bill, I want to see in the MessageBox: Bill, but if I enter Lucy I want to see …

Software Development visual-basic
Member Avatar for dreammaker
0
95
Member Avatar for DemonSpeeding

I have a file that is representing an image, here's the puddle.img file: 10 22 2222888222882222228882 2222888222882222228882 3333333333333333333333 1111111111111111111111 1111144444111111111111 1111444444411551111111 1114643434345551111111 1111333333311551111111 1111133333111111115114 1111111111111111115543 The first two numbers are the size of the image, rows and then columns. Then I have to pull in the image, and before the …

Software Development c++ file-system
Member Avatar for DemonSpeeding
0
202
Member Avatar for corruptsystem

Our group has been banging our head against the wall in this one and cannot seem to figure it out. Our program is to be able to set up menus (done), allow user(s) to input 'student names' and save them to a data (*.dat) file and add names to the …

Software Development c++ file-system ios
Member Avatar for corruptsystem
1
190
Member Avatar for teppuus

Hello, I would like to be able to declare a filename as a global constant (so I can change the input file easily), which seems to be a simple thing to do, but I can't seem to get it to work. I declared this globally: [code] const string RES_FILENAME = …

Software Development c++
Member Avatar for teppuus
0
119
Member Avatar for cutekola

// accept numbers from 0.1 to 99.9 then count the number of tens, ones, and tenths import java.io.*; public class accept99_9 { public static void main(String[] args)throws IOException { BufferedReader abc=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter a value: "); String input=abc.readLine(); float v=Float.parseFloat(input); float tens=v %100; float ones=v %10; float tenths=v %10; …

Software Development display java
Member Avatar for cutekola
0
222
Member Avatar for rwagnes

I have an executable that contains java components. From the java code, I need the access the executable's modified timestamp (so I can use the year). Any ideas?

Software Development java
Member Avatar for rwagnes
0
99
Member Avatar for wonderland

Hi, I Have tried to make average calculator but I cant make few things happen and I would really appreciate some help with this. This is the code I came up with. Questions are below. [CODE]#include <iostream> using namespace std; int main () { int a, b; float result; cout …

Software Development c++
Member Avatar for wonderland
0
181
Member Avatar for HLA91

Hi all I am totally new to C++ and I am using the Dev C++ compiler and getting the tutorial off [URL]http://www.cplusplus.com/doc/tutorial/program_structure.html[/URL] I ran the first program (code below) and it compiled fine but when I run it a box appears then dissappears so quickly I dont have time to …

Software Development c++
Member Avatar for Narue
0
180
Member Avatar for jobs

Why can't I have two different link objects? I create _link and _link2 as empty objects. When I do this: _link2 = _link, it just creates alias _link2 to link object. Same object have 2 aliases _link2 and _link. Is there a way to copy the content of _link to …

Software Development python
Member Avatar for jrcagle
0
111
Member Avatar for toncoolx

Hello there, I recently need to use c++ to do a project, and I occur some problems, hoping can get some advices from here, many thanks! My project allow a user to input a number and i need to retrieve the data from a text file. My text file's data …

Software Development c++
Member Avatar for toncoolx
0
105
Member Avatar for jimwall80

Hi community members, This is an S.O.S going out to all and any in the group that can offer me help. I am still an amateur programmer using VB6. My computer has been acting up lately and I was forced to restore it to its original settings. I did back …

Software Development visual-basic
Member Avatar for agrothe
0
93
Member Avatar for Cog7777

Hello im using masm to divide two numbers and get a divide overflow error once I execute the file. I don't see why I am getting that output when the quotient is not larger then 16 digits. Why am i getting a overflow error? Here is the code [code] title …

Software Development assembly
Member Avatar for Cog7777
0
120
Member Avatar for iCez

Can anyone help me debug this, I am getting a lot of errors. :( here's the example case: [I]User inputs.. Enter Row: 3 Enter Column: 3 Output 1 2 3 2 4 6 3 6 9 [/I] Here's my code: [CODE]import java.io.*; public class Test2 { public static InputStreamReader reader=new …

Software Development java
Member Avatar for iCez
0
94
Member Avatar for tnvkrishna

hello, i wrote a header file the file got deleted while i was compiling it that header file includes a class definition and nothing else what might be the problem? tnvkrishna

Software Development c++
Member Avatar for Salem
0
97
Member Avatar for plusplus

I have a left join in my select statement which works printing all the info from tbl1 with matching info from tbl2 I also want to print true or false depending on if there is any match for each record of tbl1 in tbl2. How would I do this?

Software Development visual-basic
Member Avatar for plusplus
1
102
Member Avatar for RichardNero

I tried to write this code out, I dont want the answer I just want someone to explain to me what I am missing and doing wrong. Suppose the population of a certain country was 125,000 at the beginning of the year 1995. The population is growing at a rate …

Software Development vb.net
Member Avatar for waynespangler
0
121
Member Avatar for plusplus

I have the following select statement which works, I need help to adapt it adobau.RecordSource = "SELECT * FROM Liegenschaften INNER JOIN tblbau ON Liegenschaften.Rimo_Liegnr = tblbau.Liegenschaft" my adobau.recordset loops through Liegenschaften and gives me all the info of Liegenschaften that has match in tblbau, but I want some info …

Software Development visual-basic
Member Avatar for plusplus
0
105
Member Avatar for kemboy

this is suppose to be a binary search to return the number of times a number is found in the array.............but for some reason it isnt calculating the correct number of times the number is found....already had my paper and pen out trying to find the error but it aint …

Software Development c
Member Avatar for ithelp
0
87
Member Avatar for sarahger9

Hi, I wrote a program that reads a file, by building up text one character at a time, looks for keywords, and replaces them if they are found. I am working on building up my output. The words come out right, and I added the punctuation back in ok. The …

Software Development c++
Member Avatar for sarahger9
0
91
Member Avatar for Run.[it]

Currently my program fires out error messages when the user enters information outwith the boundaries. However for every valid entry these will be stored in the array and the entry outwith the boundaries will be listed as blank which I dont want. Id like the program to only store an …

Software Development vb.net
Member Avatar for Run.[it]
0
110
Member Avatar for zandiago

[CODE] #include <iomanip> #include <cmath> #include <fstream> #include <string> #include<string> #include<iostream> #include<iomanip> using namespace std; int main() { ifstream infile; ofstream outfile; int num;//number of grades int Hi;//highest test grade int Low;//lowest test grade sting stat;//status of grade, whether higher or lower than avverage infile.open ("grades.txt"); outfile.open ("gradeOutput"); double number;//the …

Software Development c c# c++
Member Avatar for zandiago
0
564
Member Avatar for cowboys111

Im writing a program to calulate the distance between two points unsing structures and functions. I have everthing working perfectly except that I cant get it to repeat for a second set of points. My input file has 10 points in it bit it stops after it reads the first …

Software Development c++
Member Avatar for cowboys111
0
108
Member Avatar for mirakl

hi, I am finishing up a program and in the program I need to add numbers after a certain number example for every ten numbers 30, 40, 50 i need to add .125 i have this so far if ( age > 30 % 10 == 0 ) // Formula …

Software Development c++ ios
0
52
Member Avatar for rogenie

This is a very simple app I am trying to do. How else would sum up the total of the number the user entered? Example if the user enters 10, the loop will find the sum of 1,2,3,4,5.....10. Here is my code and I spent few hours on to come …

Software Development c++
Member Avatar for rogenie
0
112
Member Avatar for JavaNewbie07

I am trying to add the integer elements of two Linked Lists. How do I add the contents of two elements of a linked list. For example: public void main { ........ LinkList newList = new LinkList(); ......... Link link1, link2, linkAns; ...... ...... link2 = newList.deleteFirst(); link1 = newList.deleteFirst(); …

Software Development java linked-list
Member Avatar for JavaNewbie07
0
95
Member Avatar for zandiago

Write a c++ program that will read in an unknown number of employee records from a text file call “PAYDATA3.TXT”. Each employees record is a string of 47 characters (with spaces), set up as follows: Positions Data Description 0 – 14 Last Name (15 characters) 15 -24 First name (10 …

Software Development c c# c++
Member Avatar for zandiago
0
162
Member Avatar for Koldsoul

I am writing this program to use user defined functions, must be return value functions as well. It is a modification to a program already written, and am having a couple errors that I just cannot figure out. Here is the code, the errors I am getting when I compile …

Software Development c++
Member Avatar for Ancient Dragon
0
97

The End.