132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for elsiekins

Hi, i have: [CODE]string letter; cout << ">Please enter a letter: \n>"; getline(cin, letter);[/CODE] What i am trying to work out is how to restrict the user for only entering one letter - has to use a string due to being used in a function later which only takes a …

Software Development c++
Member Avatar for elsiekins
0
176
Member Avatar for mangopearapples

Hi, for some reason, my JScrollPane isn't working with mt JTextArea. Probably the most important part: [CODE] JTextArea TextArea; JScrollPane scroll; TextArea = new JTextArea(); scroll = new JScrollPane(TextArea); add(TextArea,BorderLayout.CENTER); add(scroll,BorderLayout.LINE_START);[/CODE] Whole code if you're interested in what I'm making: [CODE]import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.BufferedWriter; …

Software Development java java-swing
Member Avatar for mangopearapples
0
280
Member Avatar for jkoske

This is giving me a segmentation fault in the noBucket() function. I don't see why. Does it having something to do with it being a const function? My other accessor functions are working fine and they are declared exactly the same with just a different name. The files are longer …

Software Development c++
Member Avatar for jkoske
0
216
Member Avatar for eduard77

I have a vector that with your help I succeeded to make it work just fine. Now I want to make the same vector to work with float values but just doesn't want to make me the mathematics with float numbers. Is adding only the integers and not the float …

Software Development c++ mathematics
Member Avatar for eduard77
0
112
Member Avatar for xuexue

front end: Visual Basic 6.0 [CODE] Dim intAmount as integer intamount = val(txtamount.text) [/CODE] Back end: AS/400 db2 library: CPALLIB field: amount type: Numeric Len: 9 Decimal: 2 value: 100000 The problem is that when i insert new record to my database for this field: (amount), the value is 100000. …

Software Development visual-basic
Member Avatar for debasisdas
0
228
Member Avatar for SacredFootball

Hey all. I'm trying to learn stack operations and so far, I believe I've gotten push() and pop() down. I seem to be stuck on copy, however. I cannot get a check for empty to work correctly. [CODE] typedef struct _node { payload data; struct _node *prev; } node; int …

Software Development c++
Member Avatar for jonsca
0
97
Member Avatar for Armistice

So i'm not looking for anyone to give me code on how to do this. I would just like a tip or two. I have a .txt file with a deck of cards in it saved into a card struct like : [CODE]struct card { char suit; char value; };[/CODE] …

Software Development c++
Member Avatar for Armistice
0
354
Member Avatar for carinlynchin

hi, i have no idea why this isn't working....I placed some system.out.println's for debugging purposes and what I found is that after entering the "new game" method, thethe message shows in the console, but then the random initialization occurs, after which I placed another system.out and its not showing which …

Software Development gui java java-swing
Member Avatar for carinlynchin
0
203
Member Avatar for sj5536

How do i count space between two string in java for ex. String s = "This is my car"; i have to count number of space between this and is , is and my, and my and car.

Software Development java
Member Avatar for ztini
0
2K
Member Avatar for raschko

Issue involves: python 2.7 pil pyopengl pyside In the midst of developing a small drawing test, I've run into a situation involving line computations. Currently the drawing test works, but only enables singular point drawing at the cursor position. [IMG]http://i246.photobucket.com/albums/gg94/Braschko/Forum%20Posts/Screenshot-1.png[/IMG] I've seen python interpretations of [URL="http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm"]Bresenham's line algorithm[/URL], which works …

Software Development algorithm python
Member Avatar for raschko
0
165
Member Avatar for vin24

Guys, how to retrieve a text file in java???

Software Development java
Member Avatar for ztini
0
137
Member Avatar for ahtaniv

[CODE]class A { public: int a; A() : a(100) { } }; class B : public A { public: int b; B() : b(200){ } }; int main() { A a; B *ptrB =(B*)&a; cout<<ptrB->b<<endl; // Is there a way to get this to print 200?? }[/CODE]

Software Development c++
Member Avatar for ahtaniv
0
278
Member Avatar for SolidSora

I'm supposed to use an instanceOf for an assignment, and it says the type is incompatible. Here is my code: package City; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Brian */ public class City …

Software Development java
Member Avatar for ztini
0
97
Member Avatar for jordan0420

Im building a database to hold files i am using anydbm and what i would like is something that does this: [CODE= Python] import Tkinter import anydbm import tkFileDialog file = tkFileDialog.askopenfile(parent=None,mode='rb',title='Choose a file') print file print str(file) db = anydbm.open("database", "c") # db["1"] = str(file) for file in files …

Software Development python tkinter
Member Avatar for jordan0420
0
159
Member Avatar for c++probeginner

[QUOTE] I'm having trouble getting the player's name and score to display as well as the average score. I have been at this for about 3 hours. I think it's time for a fresh set of eyes. Can someone please help?! This assignment is due tomorrow. Thanks [/QUOTE] [CODE]#include <iostream> …

Software Development c++ video visual-studio
Member Avatar for kimmyfufu
0
192
Member Avatar for Taimoor Rana

I want to load an image for each different shoe and I'm using JLabel to help me do this. I put the image's path in the JLabel constructor but when the code runs, it doesn't display any image. Instead of an image, the image path is written. appreciate any help …

Software Development image java java-swing
Member Avatar for ztini
0
246
Member Avatar for lashbandi

Hi... i am trying to run this program...and it stays that it does not have a main method... public static void... but i have the public static final int... please let me know how i can get this program to run..thanks [CODE]public class CaesarCipher { public static final int ALPHASIZE …

Software Development encryption java
Member Avatar for ztini
0
210
Member Avatar for Josef01

I am learning vb.net from tutorial sites, book and having trouble to delete row from datagrid view. can someone help me how to delete a selected row in datagrid on click of a button .Thank you the error i get : 'user' is not declared [code] Private Sub Button3_Click(ByVal sender …

Software Development vb.net
Member Avatar for Josef01
0
4K
Member Avatar for kitty_wave

Hi guys, I am pretty new to java, and I have to write out an algorithm for a few operations following each other. The point I am at, is adding two numbers and then dividing the product. This is the code I have come up with so far, excuse the …

Software Development algorithm java
Member Avatar for ztini
0
83
Member Avatar for vin24

Hi, I created a program using the linkedlist package. I encountered an error when I tried to insert an element... By the way here's my code... [CODE] import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.*; class guiListOperations3 extends JFrame implements ActionListener { static LinkedList <String> list=new LinkedList <String>(); static JLabel …

Software Development java java-swing linked-list
Member Avatar for ztini
0
179
Member Avatar for atticusMom

Searched online and found ways that people are able to do this but I can't seem to get mine to incorporate all the words. Here is what I'm trying to do followed by my 7th try at coding it. Thanks in advance for any advise you may be albe to …

Software Development java
Member Avatar for ztini
0
170
Member Avatar for iamthesgt

In my program that uses separate compilation, the only problem I have left is a linker error. To see if it was just a syntax error somewhere obscure, I made a simple "hello world" program that uses separate compilation. I get the same error. The code is below. If someone …

Software Development c++
Member Avatar for iamthesgt
0
629
Member Avatar for zidane010h

hey guys,I'm soo beginner in C++ :$ .could you please explain logic of the loop [CODE]#include <iostream> using namespace std; int main() { int x = 0, p = 5; while(x < p) { for(int i = 0; i < x; i++) { cout << "+"; } cout << "\n"; …

Software Development c++
Member Avatar for zidane010h
0
217
Member Avatar for conztantines

write a function that will reverse the numbers in a row? so far done public void fliprow(int r) { int temp = m[r][m[r].length-1]; int ct = 1; for(int column = m[r].length; column >= 0; column--) { m[r][column] = m[r][ct]; m[r][ct] = temp; temp = m[r][m[r].length-ct]; if(ct < m[r].length) ct++; else …

Software Development java
Member Avatar for ztini
0
90
Member Avatar for RodEsp

Hey guys, so I'm trying to write a little program that will put together any number of strings passed to it into a single string and then print out that string backwards. I think I have everything correct but I keep getting a "Segmentation fault (core dumped)" error after compiling …

Software Development c
Member Avatar for RodEsp
0
1K
Member Avatar for C#Jonathan

Hi, I've just migrated an application to Visual Studio 2010 and upgraded a third party add-on called Visual WebGUI to .Net 4. I now have a problem with assembly references to the third party DLLs The latest version of the Visual.WebGui.Forms DLL for example is at 4.0..... . Our application …

Software Development assembly visual-studio
Member Avatar for C#Jonathan
0
149
Member Avatar for SacredFootball

I think the code comments show what is needed. Essentially, I just need to spit out the members name and score who are below the average score in the list. [CODE] void displayLowScore(struct payload *arrayStart , //first element of array struct payload *arrayEnd ) //last element of array { int …

Software Development c++
Member Avatar for SacredFootball
0
157
Member Avatar for Jutch

I have this assignment for school due tonight but I can't figure out the two errors causing problems for me. I've asked my class, I've asked twice on yahoo answers and I still don't understand what to change. If someone can please show me the exact changes that need to …

Software Development c++
Member Avatar for Jutch
0
204
Member Avatar for eduard77

I have a vector defined like this: [CODE] #include<iostream> #include<vector> using namespace std; typedef vector<int> VECTORINT; int main() { VECTORINT Vectorul; int x; int num; int y; cin>>num; //the number of numbers that must be entered for(int i = 0; i<num; i++){cin>>x; Vectorul.push_back(x); for(int i=0; i<Vectorul.size(); i++) cout<<Vectorul[i]<<endl; } system("pause"); …

Software Development c++
Member Avatar for eduard77
0
113
Member Avatar for Khliboy_2796

Is there a possibility of one to write the program code and do not design the form? If its possible kindly assist in helpin with the procedure.

Software Development visual-basic
Member Avatar for WaltP
0
98
Member Avatar for Jake.20

How can i disable a button after i click it and shows another form, and enable it after i close the form that was opened. Please, i need help. Thank you in advance.

Software Development vb.net
Member Avatar for Jake.20
0
131
Member Avatar for rcmango

Hi, well I have written something that compiles and runs fine with a different compiler, but when trying to use a g++ compiler, I get errors when compiling in a unix environment. Here is the command line I have used: [CODE]g++ Agent.h Agent.cpp Driver.C g++: Compilation of header file requested. …

Software Development c++ unix
Member Avatar for Akill10
0
118
Member Avatar for HeartBalloon

Hi, I have to write a code which should allow to append and item to a list. That is FIFO Logic, First In First Out, but I cannot think of anything of that kind actually. I mean, I should run the list until the last pointer, and then make it …

Software Development c++
Member Avatar for HeartBalloon
0
639
Member Avatar for Archenemie

I have the code below and the exact same code works when its put outside the function but does not when its called as a function, and it seems the function is being called correctly because the print line works[CODE]import wx class DestroyButton(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, …

Software Development python
Member Avatar for Archenemie
0
200
Member Avatar for Joshua Kidd

Hey, I'm working on a little project for Flight Simulator X, and I have seen a few things where it shows the Status of Flight Simulator X. Like on the Bottom. Say I have MS Word, and have a program, a status bar on the Bottom says " Status: Microsoft …

Software Development vb.net
Member Avatar for Joshua Kidd
0
78
Member Avatar for Violet_82

Hi there, I am doing an exercise from a c++ book, but I get few errors that I can't seem to be able to fix, and I am not quite sure why. The exercise goes:" In a right triangle with dimensions side1, side2 and hypotenuse, find all Pythagorean triples for …

Software Development c++ visual-studio
Member Avatar for Violet_82
0
904
Member Avatar for BlueZephyr

Hey everytime I run this it outputs the else of neither no matter what I enter. And I checked my conditions and the logic seems right but maybe I'm wrong. Help please! [CODE]#include <iostream> #include <cmath> using namespace std; int main(){ int n1, n2, n3; cout<<"Enter the three sides of …

Software Development c++
Member Avatar for BlueZephyr
0
97
Member Avatar for HeartBalloon

[CODE] int findWord(char ma[][iSize], char ca[],int iRing,int& X, int& Y){ int ring=0,i=0,j=0,x=0,y=0,k=0,i2p=0, iLSide=0,iSSide=0; bool bOkay=true, bOver=false; ring = iRing--; iLSide=(iSize-(ring*2)); iSSide=(iSize-((ring*2)+3)); i2p=(iLSide*2)+(iSSide*2); x=y=i=ring; while(i>=ring && i<i2p && bOver==false){ j=i; switch(i){ // WHAT'S WRONG WITH THIS?!? WHY CAN'T I ASK A CASE MINOR OR EQUAL? case =< iLSide: x=ring; y=j; break; …

Software Development c++
Member Avatar for HeartBalloon
0
178
Member Avatar for Geemon

I am sorry, I had a thread similar to this, but I have encountered a different bug. [CODE=python]def rm_b(acts): print("DINING ROOM") print(descriptions.dining) acts={"north":no_exit, "east":rm_c, "south":rm_e, "west":rm_a, "sandwich":'inv_add(sandwich, acts)'} prompt(acts)[/CODE] The "sandwich":'inv_add(sandwich, acts)' will not work. Same for all of the items I wish to allow the player to pick up. …

Software Development python
Member Avatar for griswolf
0
112
Member Avatar for discovery-power

Hi All. I have developed an application for booking meeting rooms. A user has to log in before he / she can use the system. I want the user name of that user to be shown in the form. I thaught this was easy. Please see my code below for …

Software Development vb.net
Member Avatar for discovery-power
0
142
Member Avatar for Joshua Kidd

Hello, I am making a little program for the Game "Flight Simulator X" and I need to monitor the Process state of the Program. My Main Question is How do you manage a Process so on a Label you can set maybe an If...Then...End If Statement to tell it what …

Software Development vb.net
Member Avatar for Joshua Kidd
0
73
Member Avatar for lochnessmonster

im just curious on the purpose of pointers to pointers and when i would actually ever find the use of using one! thx

Software Development c++
Member Avatar for Ancient Dragon
0
96
Member Avatar for Archenemie

I would like to destroy the second button by clicking the first I have also tried "return but2.Destroy() but everything returns an error message. Can anyone help? [CODE]import wx class DestroyButton(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, "title") panel = wx.Panel(self) but1 = wx.Button(panel, label = "click me") but2 …

Software Development python
Member Avatar for Archenemie
0
128
Member Avatar for Nandomo

I want to use Ncurses on Dev-Cpp but don't know how to install it. I have downloaded the ndk for it, any help?

Software Development c++
Member Avatar for Ancient Dragon
0
103
Member Avatar for marciaalanna

I am trying to finish this program that is due tonight. I have been working on it through out the week and thought I could figure out my errors with fresh eyes. I have got the number of errors down, but for some reason I keep getting errors like string …

Software Development c++
Member Avatar for marciaalanna
0
107
Member Avatar for Tellalca

Hey; I am developing a console game in C#. I wanted to create a file called "accounts.bin" to hold players accounts information. So when I try to create or access the file the program halts and throws an exception called "UnauthroizedAccessException". I tried to put the file into the "C:\" …

Software Development
Member Avatar for Momerath
0
268
Member Avatar for RenanLazarotto

Hey guys! Two questions: how can I completely wipe a file from disk with vb.net? I found a code in C#, converted it to VB.net online but didn't understand a letter. I was thinking on a wiper like CCleaner has, but for a selected files only. And, how can I …

Software Development file-system vb.net
Member Avatar for RenanLazarotto
0
573
Member Avatar for CompSci_Guy

As the title says, I saved over my code. I am screwed because I really need the old version. I have the original compiled .class file... can i some how get the code from inside there? or recover an earlier version of this java file (which is/was stored on my …

Software Development java
Member Avatar for stultuske
0
160
Member Avatar for PC_Intense

I have an assignment in which I need to rite an OpenGL program that displays a green square on a black background. Does anyone know a good free software I can download to run this. I'm mostly familiar with java, and since this is in C, I don't know where …

Software Development c opengl
Member Avatar for myk45
0
89
Member Avatar for shredder2794

Hello all, I'm in the process of making a program in Visual Basic 2010 where the user can click a button adding another webbrowser control to the form. How would you accomplish this and how would you go about "Dynamically" expanding the form... EG. how would you go about adding …

Software Development vb.net visual-basic
Member Avatar for codeorder
0
100

The End.