43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for pg5678

May seem like a stupid question but can an array call a function? and if so is it possible to select an array from user input, so if the array was something like Num[10] and the user would input 6, it would then select Num[5] and call the function associated …

Software Development c++
Member Avatar for gerard4143
0
147
Member Avatar for Robert955

hey. I am trying to add a menuscreen to my game using the enumeration method. I get 4 errors: No overload for method 'UpdateMenu' takes '0' arguments (at L: 161 C: 25) No overload for method 'UpdatePlay' takes '0' arguments (at L: 166 C: 25) No overload for method 'DrawMenu' …

Software Development audio storage
Member Avatar for Robert955
0
369
Member Avatar for TheWolverine

Hi all, I've got quite a simple question and after searching here and on other websites I can't seem to resolve what the "correct way" of doing this is in C++. Below is a simple piece of code illustrating what I am trying to do: [CODE] #include <iostream> class BaseClass …

Software Development c++
Member Avatar for TheWolverine
0
354
Member Avatar for Transcendent

<S> --> <A><B> <A> ---> a | b <B> ---> 1 | 1 <B> It's suppose to start will a or b and 1 afterward. it doesn't matter how many 1's are after a or b. [CODE]/* <S> --> <A><B> <A> ---> a | b <B> ---> 1 | 1 …

Software Development c++
Member Avatar for Transcendent
0
126
Member Avatar for fpsasm

Hello, I've made a program that uses an array of objects, it's work well so far, upto the point that I try to increase the size of an array. So, in main the relevant code loops like this: [CODE]int main(){ /* classes used */ phoneBook *p; .... numLines = 0; …

Software Development c++
Member Avatar for fpsasm
0
340
Member Avatar for kevinn

I'm making a project with OpenCV about tracking. But what I want is the ability to let the user import his own tracking algorithms. Is there some way that i can check in a specified folder if there are new algorithms added and how can I include them in my …

Software Development c++
Member Avatar for kevinn
0
209
Member Avatar for Celtrix

Yes i realize this is the fibonacci sequence and i understand the math im just having trouble understanding the line in red what does it equate to in laymans terms? Thanks in advance :D [CODE] a,b=0,1 while b < 100: print b [COLOR="Red"]a,b=b,a+b[/COLOR][/CODE]

Software Development python
Member Avatar for Celtrix
0
110
Member Avatar for Slyvr

How do you determine what the main hard drive is? This is what I have: [CODE]filename="savefile2.txt";[/CODE] and this is pseudocode for what I want: [CODE]filename="MainDrive:/JavaProject/savefile2.txt";[/CODE] My problem with it is, what if C: isn't the name of a person's hard drive? F:\ for instance. And also, if the folder name …

Software Development hard-drive java
Member Avatar for java_programmer
0
152
Member Avatar for anu07

This is my computer science project,we were told to make any software we wish to make,so I thought about making a calculator,below is the code,but it doesn't seem to be functioning well,could anyone help and tell me what went wrong(I am using borland cpp 4.5 compiler,this program uses getch() to …

Software Development c++
Member Avatar for anu07
0
189
Member Avatar for tasty

I don't really know how to make the code for the following question. I need a program that counts. The program will ask the user what he/she wants to count by and It will then count from 0 to 20 using what ever increment that user has chosen I want …

Software Development vb.net
Member Avatar for tasty
0
121
Member Avatar for drdream100

hi all!! here's the deal: i have this code [CODE] Sub SaveToTextFile() Handles Button1.Click Dim name1 As String = TextBox3.Text Dim st1 As String = TextBox1.Text Dim st2 As String = TextBox2.Text Dim br1 As String = "{" Dim br2 As String = "}" Dim desck As String = br1 …

Software Development vb.net
Member Avatar for razree
0
184
Member Avatar for arezz09

anybody know how to upload or set piture into windows form using code..i want create a button like browse that can chnge background and every i relaunch application,bckground is still there..please anybody..

Software Development image vb.net
Member Avatar for codeorder
0
295
Member Avatar for manish250

Hello all I am using reading a config file in which there is a entry [CODE]code_list="515,522,560,000" [/CODE] while i am reading this string in my java application and using split on it and then assigning it to a string[].it is giving null pointer exception.needed code is as follows [CODE] static …

Software Development java
Member Avatar for manish250
0
2K
Member Avatar for Mike Askew

The program is currently trying to pull information from three different database tables and compiling the information onto one screen, to do this i am using three different connections and a function to handle the data at each stage. The issue is as my code hits PageLoadStage of "2" and …

Software Development vb.net
Member Avatar for Mike Askew
0
150
Member Avatar for Labdabeta

I have made a header file for SDL GUI applications. I was testing the SDLGame::Draw() function when I got a SigSegV fault. The fault occurs in different locations each time I run the program. Also sometimes instead of a SigSegV fault I get a SigTrap fault. Here is the code …

Software Development c++ gui
Member Avatar for Labdabeta
0
881
Member Avatar for Amillia89

[CODE]import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; import java.lang.*; class Main extends JFrame { public Main(String st) { setLayout(null); setDefaultCloseOperation(javax.swing. WindowConstants.DISPOSE_ON_CLOSE); JLabel lab=new JLabel("Welcome "+st+"!! \n Click OK to Continue"); JButton OK = new JButton("OK"); OK.setMnemonic('k'); OK.addActionListener( new ActionListener() { JButton OK; public void actionPerformed(ActionEvent e) { [COLOR="Red"] Main();[/COLOR] …

Software Development java java-swing
Member Avatar for JamesCherrill
0
147
Member Avatar for bettybarnes

pls help me with auto generated alphanumeric pk say i want my customer id to be like these CUST00001 CUST00002 CUST00003 CUST00004 any help is a great help.! Blessings!

Software Development vb.net
Member Avatar for CodeWord
0
2K
Member Avatar for abelingaw

What i wanted to do is to limit the number of users to be registered for my system. One for User type and one for Administrator account, and if there is already a user and admin account, adding will be disabled, else, enabled. Here's the code im using. [CODE]Private Sub …

Software Development visual-basic
Member Avatar for AndreRet
0
156
Member Avatar for emaduddeen

Hi Everyone, In my form there is a "Validating" event on a textbox. This form also has a "Cancel" button. Is there a way to not execute the "Validating" event when the user clicks on the "Cancel" button? Please show me code to do this. Thanks. Truly, Emad

Software Development vb.net
Member Avatar for emaduddeen
0
1K
Member Avatar for carlitosway17

Hey Guys, I am working on an assignment where we are supposed to output the date in different formats for example, month, date, year or date,month year, I have implemented a method to change for the arrangement of dates, It builds successfully but has errors when it runs plus it …

Software Development java
Member Avatar for mKorbel
0
191
Member Avatar for doomas10

Hello all, just a quick question! I was wondering how can you pace lines together in python. In my case i have a file like this: [CODE]<word> <word> <number>.txt <word> <word> <number>.txt <word> <word> <word> <number>.txt <word> <word><word><word> <number>.txt <word> <word> <number>.txt <word> <number>.txt <word> <word> <number>.txt [/CODE] Does anyone …

Software Development python
Member Avatar for doomas10
0
212
Member Avatar for sj5536

hi i have to read tif File using java file has 3 pages and take first two page of that file and create new tif file with different name can u suggest me how should i start

Software Development file-system image java
Member Avatar for peter_budo
0
309
Member Avatar for hairpull

This code randomly generates 4 lottery tickets and prints them on seperate lines. The code works, but what if I wanted this to print for 100 lottery tickets? Is there a way to write this with less lines of codes? Would using a for loop work? [CODE] import java.util.Collections; import …

Software Development java
Member Avatar for hairpull
0
254
Member Avatar for Slyvr

It's only reading every other line. It's supposed to print out: 28 80.0 22 1 2 2 3 1 3 But it's only reading: 80.0 1 2 1 [CODE]//Load button - #=daynum, $=wallet, @=inventory, &=employees, !=customers if (btn2.getText().equals("Load")){ int id=0; File file = new File("savefile1.txt"); BufferedReader reader = null; try …

Software Development java
Member Avatar for Slyvr
0
3K
Member Avatar for mmmathur

Hi All I am new to XSLT development and have stuck at simple but essential point. I want to remove the content which is in between two specific comment tag <!--E-->Text which need to remove<!--/E--> I do try with the given below code [CODE]<xsl:template match="comment()"> <xsl:text disable-output-escaping="yes">&lt;</xsl:text><xsl:value-of select="."><xsl:text disable-output-escaping="yes">&gt;</xsl:text> </xsl:template> …

Software Development xml
Member Avatar for mmmathur
0
635
Member Avatar for cutedipti

Hi, When we define any integer array like int a[3]={1,2,3}; then it will assign the values as a[0]=1, a[1]=2, and a[2]=3 But, when we define any character array as char a[3]={'a','b'}; then compiler here automatically consider '\0' null character to represent the end of the string So, my question here …

Software Development c
Member Avatar for gerard4143
0
275
Member Avatar for bettybarnes

hi im having errors with listview binding navigation specifically in last >> and first << here's my code [CODE] Dim inc As Integer Dim MaxRows As Integer Dim dr As DataRow Dim ds As DataSet Public Sub navigaterecords() txtMed_ID.Text = ListView1.Items(inc).SubItems(0).Text txtMed_name.Text = ListView1.Items(inc).SubItems(1).Text txtfname.Text = ListView1.Items(inc).SubItems(2).Text txtMname.Text = ListView1.Items(inc).SubItems(3).Text …

Software Development dataset listview vb.net
Member Avatar for bettybarnes
0
159
Member Avatar for jackmaverick1

Hmmm... I'm trying to call a class and it doesn't work and i get this error /home/XXXX/Desktop/language/main.cpp|13|error: expected constructor, destructor, or type conversion before ‘.’ token| The syntax is: [CODE] print.base="print"; [/CODE] this simple method call returns an error. Am i really doing something wrong, seeing as i've already looked …

Software Development c++
Member Avatar for jackmaverick1
0
121
Member Avatar for jackabascal

Hi. I would like to achieve an effect similar to how strings in between the quotation marks in Visual C# are colored. I would like to italicize the text for anything between two asterisks (Including the asterisks themselves) inside a RichTextBox. For example: This is not counted [I]*This is counted*[/I] …

Software Development
Member Avatar for Momerath
0
158
Member Avatar for caltech

[CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int divides(int,int); int main () { int count = 10; //int prime = divides(count); int p = 0; // number of primes cout.setf(ios::fixed,ios::floatfield); cout << setw(6) << "NUMBER" << "\t" << setw(8) << "DIVISORS" << endl << endl; while (count<=50) { …

Software Development c++ ios
Member Avatar for caltech
0
126
Member Avatar for pseudorandom21

[url]http://www.boost.org/doc/libs/1_46_0/libs/smart_ptr/shared_ptr.htm#ThreadSafety[/url] This section somewhat confused me, in my code I have a matrix of shared_ptr's pointing to an entirely thread-safe class. But the shared_ptr documentation says it is only as thread-safe as the built-in C++ types. Does this mean that if I read/write to my thread-safe class using shared_ptr's at …

Software Development c++
Member Avatar for mike_2000_17
0
185
Member Avatar for cppgangster

Hi, is here any other issues then readability between two functions below? [CODE] void getNames(int) { .... } void getnames(int meaningfullName) { static_cast<void>(meaningfullName); ... } [/CODE]

Software Development c++
Member Avatar for cppgangster
0
112
Member Avatar for Archenemie

I've tried every way I can possibly see to try and convert the value from the numctrl to a decimal but the problem lies with the retrieved value being a float. I cant covert the float to a string first because it looses the trailing 0 in values such as …

Software Development python
Member Avatar for zentraders
0
295
Member Avatar for poloblue

Good Afternoon, Can someone help me with this program which is an assignment for a class. I'm new to C++ its my fist course in computer science. The assignment details are: 1. The function removeAt of the class arrayListType removes an element from the list by shifting the elements of …

Software Development c++
Member Avatar for poloblue
0
2K
Member Avatar for hmnetonline

I want to add a series of buttons, but I don't know what it is called, which makes it difficult to look into. In my scenario, I want a list of four buttons. Each button has an on or an off status (pressed or unpressed). The user would be able …

Software Development
Member Avatar for Mitja Bonca
0
136
Member Avatar for AngelicOne

I binded data to a combobox using a dataset. [CODE] companycb.DisplayMember = "company"; companycb.ValueMember = "visitorVisitID"; companycb.DataSource = ds.Tables["tblVisitorVisit"];[/CODE] I need to remove the duplicate values from the combobox. Is there any other way instead of doing it using an SQL Distinct query?

Software Development dataset
Member Avatar for Mitja Bonca
0
102
Member Avatar for hanvyj

I have made a small example to illustrate my problem. I have overwritten the createToolTip method for a custom JComponent (eventually it will depend on where abouts the mouse is in the component as to what text to bring up) At first I thought it wasn't being called, but i …

Software Development java java-swing
Member Avatar for mKorbel
0
1K
Member Avatar for newack

Hello, I have to finish my assignment. I have different console exercises. I can solve it. but I have to combine them so that they will execute one after another. I do not know how to do that. in my exercise, I make one program to declare class and other …

Software Development
Member Avatar for mcriscolo
0
135
Member Avatar for rude04

hello everyone,i need to make an encryption/decryption program and I'm almost finished, the problem is when i tried to add some gui an error about throwing exception keeps showing.. this is the code without the gui and it works just fine because the [B]throws Exception[/B] is in the main.. [CODE] …

Software Development algorithm api encryption gui java java-swing
Member Avatar for rude04
0
724
Member Avatar for pato wlmc

SORRY FOR THE NOOB QUESTION, but until some time ago (1 or 2 weeks) all my programs we comand-line, so I didn't have to... build them(?) But some days ago, i decided to create a program with GUI, and I used QT creator for that. Now My program is finished, …

Software Development c++ gui qt
Member Avatar for pato wlmc
0
118
Member Avatar for 24x24

Ok I have another homework problem. Essentially I am to make a text file of randomized characters ( leters bothe upper and lower case, numbers, spaces and specialized characters) and import it as a string into my program. From there I am to make all lowercase letters uppercase. I think …

Software Development java
Member Avatar for 24x24
0
440
Member Avatar for daviddoria

I have been using a [icode]Image<Node>[/icode] as the main object to store the data for my program. It is a 2D grid of Node objects. The nodes have properties like [icode]bool Visited[/icode], [icode] float Priority[/icode], etc. I often want to modify these nodes, put some of them in a vector …

Software Development c++
Member Avatar for daviddoria
0
167
Member Avatar for madval88

I have saved a 2D matrix in a numpy file (.npy) in python. Is there a way I can access the same from C++ and possibly read in the values in a stl vector? [URL="http://www.scipy.org/C++_Extensions_that_use_NumPy_arrays"]This [/URL] is vaguely relevant. But here you make the call from python. I want to …

Software Development c++ python
Member Avatar for madval88
0
769
Member Avatar for johnt68

Hello:) I can change background colour on my existing form like this: [CODE]this.BackColor = System.Drawing.Color.Green;[/CODE] or like this [CODE]ActiveForm.BackColor = System.Drawing.Color.Green;[/CODE] But I have another form called CustomerData What I want to know is how I go about using a button click event on the first form to change the …

Software Development
Member Avatar for johnt68
0
3K
Member Avatar for mrgreen

hello, I'm fairly new to programming in general, and i'm having some trouble figuring out how to use a stack and queue to check to see if a word or certain order of numbers/letters form a palindrome or not. My logic is to read in the original string, push/pop characters …

Software Development c++ queue
Member Avatar for biljith
0
177
Member Avatar for maikens

Hi all, I have written a balanced binary search tree as part of an assignment (make a simple Spell Checker). Each node has, among other values, two height ints, leftHeight and rightHeight, to keep track of the heights of any subtrees. My problem is that after a rotation, the heights …

Software Development c++
Member Avatar for maikens
0
1K
Member Avatar for dirkjan75

Hi, Just a form where I want to put a default value for a combobox: private sub form_load() me.combobox1.defaultvalue = 3 end sub The property defaultvalue is giving an error, 'method or data member not found'. what do you think?

Software Development visual-basic
Member Avatar for AndreRet
0
114
Member Avatar for Jake.20

Please i need help in leap year. My problem is, all of the month has a date of 1-31, except for feb. after i choose feb, as my month ( i'm using combo box ) , it removes the date from 29-31, and if i choose a leap year, it …

Software Development vb.net
Member Avatar for Jake.20
0
619
Member Avatar for bklynman01

I have a set of code that builds a table as the user enters information. This information may be changed more than once before it is considered complete. After the user is done, I want them to click a button, and have that information entered into the SQL database where …

Software Development sql vb.net
Member Avatar for bklynman01
0
202
Member Avatar for And1

I am fairly new to python and am trying to create a table for work. At the moment I use a paper based system with 11 columns. I wanted to see if I could replicate my table in python 3.1.1 The column names are: 1. RMA number 2. Customer 3. …

Software Development python
Member Avatar for vegaseat
0
14K

The End.