43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for aot

I want to be able to use scales to let the user answer various questions on screen. However, though I can get scales to work fine in other programs, in this one in particular they seem to have bugged out. What's happening is that, if I set [inlinecode]showvalue = False[/inlinecode], …

Software Development first-post python
Member Avatar for bumsfeld
0
80
Member Avatar for Duki

Hey guys, I'm stuck again. The program is supposed to get the estimated population after n years using the equation P + (B*P/100)-(D*P/100) and the growth rate using B-D. Here is what I have so far, but I can see I'm going to be getting stuck. How can I set …

Software Development c++
Member Avatar for Duki
0
4K
Member Avatar for a1eio

Hi, I'm trying to pin an image to a button, using the 'image' option. I've looked about on the net and it seems the best way to do it is to create the image in a PhotoImage object. I've done this and then stuck it onto the button but for …

Software Development python
Member Avatar for a1eio
0
156
Member Avatar for Duki

Hey everyone, we're going over functions now and I am supposed to write a program that counts the number of vowels in string of characters. I'm not sure what I'm doing wrong... could someone help? #include <iostream> using namespace std ; int isVowel ( string ) ; int main() { …

Software Development c++
Member Avatar for Duki
0
245
Member Avatar for JamesDT

I'm using the free Microsoft Visual Basic 2005 Express Edition My problem: I have a main form with my options (save, open, etc). I have a form to handle my Open (I'm opening multiple data-tables) and use a masterList.txt to keep track of my current data-tables, and display them in …

Software Development microsoft-access visual-basic
Member Avatar for PVBert
0
97
Member Avatar for christiannmandi

Hello everyone. I am new to this forum and new to visual basic. I am writing a program and all is well except for one problem that I cannot get over.. I have a integer, it is random... I need to convert it to a string so I can put …

Software Development visual-basic
Member Avatar for PVBert
0
132
Member Avatar for GeneM

Hello all, I am having a problem performing a calculation while in formview. I am using visual studio 2005, sql and C#. I have many textbox's that a user inputs, some of these require the calculation of subtotal and total. Here is a small example of what I have tried; …

Software Development c# visual-studio
Member Avatar for GeneM
0
138
Member Avatar for disc

I'm trying to retrieve the name of the computer that my programm is running on. This is the code: [code] TCHAR compName[MAX_COMPUTERNAME_LENGTH + 1]; DWORD cnt = MAX_COMPUTERNAME_LENGTH + 1; std::string name = [COLOR=#800000]""[/COLOR]; [COLOR=#0000ff] if[/COLOR]( GetComputerName( compName, &cnt) ) { name = compName; } [COLOR=#0000ff] return[/COLOR] name; [/code] The …

Software Development c
Member Avatar for disc
0
106
Member Avatar for mariaprabu

Hi, While compiling error found. Please give a solution as soon as posible. CODING: ---------- [code=c] #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> #include "delayImp.h" // // Local copies of strlen, memcmp, and memcpy to make sure we do not need the CRT // extern "C" static inline size_t __strlen(const char …

Software Development c++ data-structure
Member Avatar for mariaprabu
0
365
Member Avatar for Amanda21

[code=cplusplus] #include <iostream> #include <fstream> #include <string> using namespace std; const double PRICEA = 9.95; const double PRICEB = 14.95; const double PRICEC = 19.95; const int ONE = 10; const int TWO = 20; const double EXTRA1 = 2.00; const double EXTRA2 = 1.00; int main() { int hours; …

Software Development c++
Member Avatar for Amanda21
0
110
Member Avatar for scru

I have 2 issues:rolleyes: : 1. I'm creating a combobox from inside code (sort of dynamic, when the user finishes a row, another row appears) and I would like to know how to set the list of items the user chooses from. 2. How can I block the user from …

Software Development
Member Avatar for Killer_Typo
0
65
Member Avatar for addicted

Hey, There are somethings i dont understand in classes, for example let us examine this : we created a class Employee , with private data members firstName, lastName and monthlySalary; we have some functions that performs operations like a constructor, set and get functions on this data members. Now! we …

Software Development c
Member Avatar for ~s.o.s~
0
116
Member Avatar for volscolts16

I am taking a Java Beginner class, which I have explained in an earlier thread. I read the chapters and do understand them to an extent, but when it comes to doing the homework, I am at total loss. I have put in for a tutor, and hopefully one comes …

Software Development java
Member Avatar for blufab
0
173
Member Avatar for sneekula

How can I let the Tkinter Button command do more than one function?

Software Development python tkinter
Member Avatar for aot
0
3K
Member Avatar for fulyaoner

Hi to everyone... I am told to code a Schelling's Segregation Model simulation in C++ . This is about agent simulation and let me explain shortly what it is wanted: * There is a place like the chessboard (8*8) * there are 2 kind of people , the X and …

Software Development c++ linked-list
Member Avatar for fulyaoner
0
486
Member Avatar for rodkay

Folks, Most of you can see what the below segment of code is doing, the problem I have is that the program is skipping the next line in the source file (airportsMaster) after it has processed a successful match. Is the problem because I am using getline twice or that …

Software Development c++
Member Avatar for rodkay
0
104
Member Avatar for Derice

i am a newbie in C++ file processing... Any1 can guide me to search for an item(lastname) in the example below? what is [B]seekg[/B] or [B]seekp... [/B]how to use it? [code=cplusplus] #include<iostream> #include<fstream> using namespace std; void main(){ char firstname[10], lastname[10]; int age; ofstream write("text.txt", ios::app);/*actually i am not sure …

Software Development c++ file-system ios
Member Avatar for ~s.o.s~
0
132
Member Avatar for spankyg

I have arranged this code in many different ways. I can't seem to make it simply print the array. I have read alot about pointers and arrays, but the explanations are scetchy at best. What exactly are the rules for properly pointing to an array? #include <iostream> using namespace std; …

Software Development c++
Member Avatar for John A
0
125
Member Avatar for darylharkin

i'm currently in the middle of a Java programming assignment, and having quite a spot of bother! for some reason, when i run my code (which has no visible errors), a small window appears with the words Swing Example in blue italics. anyone got any idea what coud be causing …

Software Development java java-swing
Member Avatar for darylharkin
0
79
Member Avatar for raj157

for regular series caluclation we could use this [CODE]{ double summand = 1; int n = 1; double sum = 1; do { summand = summand * x / n; sum = sum + summand; n--; } while (summand > 0.00001); return sum; }[/CODE] i.e for e^x= 1+x+(x^2)/2! + (x^3)/3! …

Software Development c++
Member Avatar for need.help
0
360
Member Avatar for addicted

i just started working on structures and i am having this problem: i created a structure "point" thus : [code] struct point { double x,y; }; [/code] i created another structure "rectangle" that contains a point as the origin like this: [code] struct rectangle { point origin; double width, height; …

Software Development c++
Member Avatar for addicted
0
108
Member Avatar for IwalkAlone

Q.Write a function to accept upto 25 numbers and display highest and lowest number along with all the numbers. Solution I tried [code=c] #include<stdio.h> #include<conio.h> void main() { int array[25],low,high; int i; clrscr(); do { printf("Enter a number(0 to terminate)\n"); scanf("%d",&array[i]); }while(array[i]!=0); i=0; low=high=array[0]; while(array[i]!=0) { if (low>array[i]) low=array[i]; else …

Software Development c
Member Avatar for IwalkAlone
0
201
Member Avatar for jan1024188

What do you think is better for making applications? I like QT API verry much, but I dont know how compatible is with a system . I dont like VC++ because I can only use it on windows. Please help me to decide.. What do you think?

Software Development api c++ qt windows-api
Member Avatar for ~s.o.s~
0
249
Member Avatar for flageolet

I want to create several files at once containing the same data. Is this possible? I tried using a variable in the file pointer and file name: [CODE] int tel; for (tel = 0; tel < 200; tel++) { FILE *bestand_patienten[tel] = fopen("patienten/patientent[tel].txt", "w"); fprintf (bestand_patienten[tel], "hallo"); } [/CODE] Didn't …

Software Development c
Member Avatar for flageolet
0
68
Member Avatar for gackiem

hi everybody, I've got some troubles in C and i need your help In C: (test.c) Suppose i include <unistd.h> and i call function "open" ==>> it run OK In C++: (test.cpp) I'm using a framework (e.g. RTM) which is function "open" has already in it. My problem is: althought …

Software Development c++
Member Avatar for gackiem
0
95
Member Avatar for san_fran_crisko

Hi, I am trying to store details in a Vector and then recall them using different search categories. I'm getting no errors but the details I enter are either not being stored or not being recalled. I don't know what one it is. I attached the code rather than copy …

Software Development java
Member Avatar for san_fran_crisko
0
110
Member Avatar for san_fran_crisko

Hi, I cannot for the life of me figure out why I keep getting the error message, "cannot find symbol method methodname()" when I try to call methods from another method. I have tried changing the main method so its not static but it makes no difference. Anyone who could …

Software Development api java
Member Avatar for san_fran_crisko
0
147
Member Avatar for RisTar

Hi , im trying to create a program that could delete number from an array and resize the array to the correct size . Array[0] = 32 Array[1] = 30 Array[2] = 40 Array[3] = 31 Array[4] = 61 Deleting the number 40 New array Array[0] = 32 Array[1] = …

Software Development c
Member Avatar for RisTar
0
113
Member Avatar for missedthepit

I am designing a 2 player car racing game, and I need to be able to control both cars at the same time from the keyboard (using the arrow keys for one and a,s,d,w for the other) I can get them to work when the other one is not being …

Software Development first-post python
Member Avatar for missedthepit
0
1K
Member Avatar for vicky_dev

Check this code: [code=c] float velocity, acc, time; . . velocity = velocity - acc * time if( velocity == 0.0 ) { // Do something } else { // Do something else } [/code] This code isn't always workng. When the velocity is supposed to be exact 0, it …

Software Development c
Member Avatar for vicky_dev
0
84
Member Avatar for a1eio

Hi, I want to create a little Frame class that has two labels built in, the code snippet below is the class. [CODE=python] class DescriptionFrame(Frame): def __init__(self, master, title="", text=""): Frame.__init__(master) self.title = title self.text = text self.titleLabel = Label(self, text=self.title, font=("Times", 12, "underline"), fg="darkred") self.titleLabel.grid(row=0, column=0, sticky=W) self.mainLabel = …

Software Development python tkinter
Member Avatar for a1eio
0
940
Member Avatar for jan1024188
Member Avatar for jan1024188
0
101
Member Avatar for gerik

Does anyone know of a website that provides a lot of good problem solving exercises, or perhaps a great book for this? I've been reading a couple books on C++ but all of the exercises the books provide are sort of mediocre and don't really train me to actually use …

Software Development c++
Member Avatar for Ancient Dragon
0
137
Member Avatar for JadedTortoise

Ok I just started programming again after about 10 years, and i was doing the suggested beginner problems. The first one to create a program that returns the factorial of a number. I think i got it all down right but compiler is saying "expected primary-expression before else" here's the …

Software Development c++
Member Avatar for WaltP
0
117
Member Avatar for disc

Goodmorning, Can anyone tell me how to convert a TCHAR to a std::string ?? Thanks....

Software Development c
Member Avatar for disc
0
195
Member Avatar for aot

Here's something that I've wished for a number of times so far: the ability to create a function (taking X) that creates X variables, even if they are all initialized to the same value. For example, [inlinecode]f(3)[/inlinecode] would assign [inlinecode]var1 = 0[/inlinecode], [inlinecode]var2 = 0[/inlinecode], and [inlinecode]var3 = 0[/inlinecode]. My …

Software Development python
Member Avatar for aot
0
135
Member Avatar for Masood Ali

Hi All. I m a C++ programmer and I m trying to understand a piece of code. It fetches the values through command line arguments and makes a decision on the basis of these values. This code is working well but I dont know how? [code] for (int i = …

Software Development c++
Member Avatar for Masood Ali
0
141
Member Avatar for delphi_uk

Hello to you all, I am having problems with some code that I am working on for a text parsing system from an external *.txt file. The problem seems to stem from the Tokenize function, as I get a: "LNK2019 error: unresolved external symbol "void __cdecl Tokenize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> …

Software Development algorithm c++ delphi
Member Avatar for delphi_uk
0
107
Member Avatar for flageolet

I would like my program to execute some code using random variables. Whether this happens is dependant of three conditions: 1) a variable (first) should be bigger than an other (second) 2) a variable (third) should be equal to an other (fourth) 3) it should check these thing maximum 5 …

Software Development c
Member Avatar for WaltP
0
120
Member Avatar for hbk619

i'm wrting a basic C program which the user "talks" to the program, you know the sort. well my main menu looks like this: [code] int main() { char name[50]; char mood; printf("hey there, .. whats your name?\n"); gets(name); printf("%s is it? Well how are you today?\n a.Good\n b.Ok\n c.Bad\n", …

Software Development c
Member Avatar for hbk619
0
206
Member Avatar for dballers

sorry i'm newbie in here....i have a problem in C++..and this is the first time i did the programming codes, so that is so confusing for me...anyone can help me to solved this problem? [quote]The value e^x can be approximated by the sum 1 + x + x2/2! + x3/3! …

Software Development c++
Member Avatar for dballers
0
106
Member Avatar for AikoYamamato

Basically I'm trying to take a Template String and store it in a variable for later use. I'm new with Python and programming languages in general so I'm finding difficulty in doing this. This is the code I'm using to generate the string: [code]from string import Template s = Template('$who …

Software Development python
Member Avatar for AikoYamamato
0
181
Member Avatar for ally1002

[COLOR=#941edf] [/COLOR][COLOR=#941edf]Hello, im new. And I'm kinda stumped. We were given an exercise to do in which the user enters a number in roman numerals and the program converts it to decimal numbers. I have no problem convert if the number given is in the right order from the largest …

Software Development java
Member Avatar for ally1002
0
86
Member Avatar for Romillywinter

:eek: hi, Im new here, anyway i'm trying to work out how to get the smallest number from the user's input of four numbers, n1,n2,n3, and n4.. im a novice @ this so i'll copy the section of the program here and you can see whats going wrong with it..i …

Software Development pascal
Member Avatar for Romillywinter
0
88
Member Avatar for jnabeel

wtie a program which take as tring and arrange in alphabetic order [code=c] #include<stdio.h> #include<conio.h> #include<iostream.h> void main (void) { clrscr(); char b[7]={98,120,97,113,122,121,101},temp=0; while (!(b[0]<b[1]&&b[1]<b[2]&&b[2]<b[3]&&b[3]<b[4]&&b[4]<b[5]&&b[5]<b[6]&&b[6]<b[7])) { if (b[0]>b[1]) { temp=b[0]; b[0]=b[1]; b[1]=temp; } if (b[1]>b[2]) { temp=b[1]; b[1]=b[2]; b[2]=temp; } if (b[2]>b[3]) { temp=b[2]; b[2]=b[3]; b[3]=temp; } if (b[3]>b[4]) { …

Software Development c++
Member Avatar for jnabeel
0
295
Member Avatar for mzd12111

hi Guys this is my problem : a) what should i have to show to Proove that a sort algorithm work well b)what is the order of this algorithm : [code=c] void mySort(int[]A , int n){ int t,i; for (i=1 ; i<=n; i++){ while(A[i] != i){ t = A[i]; A[i] …

Software Development algorithm c++ data-structure
Member Avatar for mzd12111
0
125
Member Avatar for mr.sweetchuck

I'm writing a Java ME app that will access servlets on a tomcat server, (version 5.5) and I'm having a problem. In my client I'm trying to use a HTTP connection to the servlet, like so: [code] if (command == select && currentForm == login) { HttpConnection connection = null; …

Software Development client-server java
0
86
Member Avatar for rajeshreddy

program to create two threads ,by using them sort two files using merge sort by using one more thread merge them

Software Development c
Member Avatar for Salem
0
69
Member Avatar for Suplexx

I'm somewhat new to Python and want to clear a few things up regarding running scripts. Alright, so here's what I want to do: I want to run a script inside of a script, and then have the first "parent" script continue running normally. I have tried using both execfile() …

Software Development first-post python
Member Avatar for vegaseat
0
132
Member Avatar for Logi.

Hi, Im having trouble with the piece of code below, i want to have the image change every time you press the button. This code is from a larger project but this is the bit that i cant get to work. Any ideas? [code=python]import Tkinter import random import Image, ImageTk …

Software Development image python tkinter
Member Avatar for vegaseat
0
1K

The End.