132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for jackmaverick1

Hi! I'm learning how to make a GUI in Java. I'm wondering how to add a JThingy (JLabel, etc) without the use of the add(NameOfJThingy); Because add(); isn't static, you can't use it in a static function (like main, which must be static). I've seen that the constructor can help, …

Software Development gui java
Member Avatar for JamesCherrill
0
151
Member Avatar for geekme

while debugging my code in code blocks I always get this error "<filename> - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! what should I do?

Software Development c++
0
62
Member Avatar for JJHT7439

I have a quick question that I'm hoping someone can help me with on here. I have 2 2d int arrays that I create for a board state and a solution that look something like this: int[][] P1 = new int[][]{{0,2,0,0,0,0},{0,0,3,0,0,0},{5,0,0,0,0,0} etc. ect. They're 6x6 arrays and I need a …

Software Development java
Member Avatar for JJHT7439
0
136
Member Avatar for msrox

Hi there, I am new in C++/CLR. I am trying to access to Form1 property from a header file, but I can't. I have included this header file in Form1.h. Here is the source of the header file: // General.h #ifndef GENERAL_H #define GENERAL_H #include "Form1.h" void ChangeFormText() { Form1^ …

Software Development c++
Member Avatar for Ancient Dragon
0
427
Member Avatar for saqi1986

for (int m = 0; m <cName.Length; m++) { Console.WriteLine("{0} {1} {2}",cName, cMarks, cGrade); } i want to print the values of Arrays which are cName, cMarks, cGrade respectively. but em not able to print.

Software Development
Member Avatar for saqi1986
0
98
Member Avatar for sarifah n

Hi based on the title, I want my textfile created can save at any location folder . Please help me.

Software Development vb.net
Member Avatar for sarifah n
0
1K
Member Avatar for sakurayana

[code]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import java.util.*; public class Cinema extends JFrame { private JLabel lblName,lblIC, lblPN, lblPerson, lblTicket, lblTP; private JTextField txtName, txtIC, txtPN, txtPerson, txtTicket, txtTP; private JRadioButton rbA, rbB, rbC, rbD, rbE, rbF; private ButtonGroup radioGroup; private JCheckBox cbxA1, cbxA2, cbxA3, cbxA4, cbxA5, cbxA6, …

Software Development java java-swing
Member Avatar for jwenting
0
145
Member Avatar for peq

Title says it all, basically I'm just trying to print the pointer *p to display all the values in that array. [CODE]#include <iostream> #include <string> //#include <stdlib> using namespace std; void extend(double *p, double *q, double *a, int c); int main() { const int CONST = 10; double price[CONST] = …

Software Development c++
Member Avatar for peq
0
207
Member Avatar for ragnarok511

I am currently a C# developer with about a year of experience. I am currently working on finishing my computer science degree with a minor in mathematics. I love the job that I am in, but I the things I really want to do are in C++ (i.e. game development, …

Software Development c# c++ mathematics
Member Avatar for thelamb
0
242
Member Avatar for _avishek

Hello, world! This is my first post on DaniWeb, though I have frequented it quite often. I'm using gcc and make (on Ubuntu 10.10) with GVim for creating a foundation library in C. Within my code I've built in rudimentary profiling and assertion policies that are enabled through a symbolic …

Software Development c ubuntu
Member Avatar for _avishek
0
595
Member Avatar for wildplace

how do i move the value of %eax to the memory location of %0 [CODE] int size 10; long *list = (long*) malloc(size*sizeof(long)); asm( movl $999, %%eax movl %eax, (%0) // this is what im trying, how do i fix it? :"=r"(list) :"0"(list), "a"(strLen) );[/CODE]

Software Development c
Member Avatar for wildplace
0
123
Member Avatar for ronthedon

I've spent the last hour trying to figure out why my calculations are not adding up. Once i run the program it just output 0 for the total points program averages and etc and it also leaves student name blank. Can someone please help me figure out the issue. thanks …

Software Development c++ display
Member Avatar for jonsca
0
180
Member Avatar for bhagvad301

Hi, I made setup file, i install it on windows 7, it install successfully , when i execute using shortcut key or .exe file it gives a message "application has stop working" and not open any form and close automatically.

Software Development c c# c++
Member Avatar for abelLazm
0
2K
Member Avatar for adixovi

Hi, this is a clue game in prolog. [B][U]I'm posting it to thank everyone that takes the time to post and help people, like me.[/U][/B] The program is spanish, cause in from México, but it's a clue game. Features: Write and read *.txt files, and use their content to compare …

Software Development gaming
0
160
Member Avatar for bigdan182

hey guys, im fairly new to this so feel free to tell me if i need to supply more info. basically i need to write code to read in a text file and store different values in different variables, so for example i would read in: bob 1.1 maths 1.2 …

Software Development c++
Member Avatar for abhimanipal
0
251
Member Avatar for kucing

[code] 1: int main() 2: { 3: unsigned short x; 4: unsigned short y 5: ULONG z; 6: z = x * y; 6: return 0; 7: } [/code] Please ... i got to many error. When I want z value to write in Textbox form window. Just like var …

Software Development c++
Member Avatar for jonsca
0
238
Member Avatar for yancouto

EDIT: My problem was solved. :) But I have a doubt, what is the most effective way to wait for something to happen in java? for example, if I want to wait for a boolean b to be true, does this below work? [CODE=java]while(!b) {} //stuff to do after wait …

Software Development java
Member Avatar for yancouto
0
132
Member Avatar for Sturdy

Hi All,, Same as the title, Can we clear all textboxes in same time? this is possible? Its consume many time to code if we have to write clear code for every textbox. Best Regards

Software Development visual-basic
Member Avatar for Sturdy
0
156
Member Avatar for dimmu1

i have this function for dealing cards in card game. it is working fine, but i cant figure out how to pass a variable in it. Here is what i mean: This function will deal 5 card. but the user should have the option to change 1 or multiple cards …

Software Development c
Member Avatar for WaltP
0
114
Member Avatar for msrox

Is there any LED control to add to MFC project in order to have some graphic sense of e.g a timer?

Software Development c++
Member Avatar for msrox
0
115
Member Avatar for bLuEmEzzy

any idea how to use autocomplete in the textbox getting the records from database? i tried using the properties of textbox. But if the table is updated then autocompleteCustomSource is not updated... please guide me.. thank u.

Software Development vb.net
Member Avatar for bLuEmEzzy
0
1K
Member Avatar for littlelou

What i'm using; VB2008 express, Access 2003 DB, Objective to clear the datagrid view after updating. This should happen when the user clicks the OK button "which confirms the update". Below is what I have. I see in some forums they use the .Clear and some other options so what …

Software Development vb.net
Member Avatar for littlelou
0
773
Member Avatar for IndianaRonaldo

[CODE]#include<stdio.h> #include<stdlib.h> #include<string.h> void main() { char* a[10]={"asd","QWE","ghj"}; printf("%s %c",a[2],a[2][2]); // prints properly... "ghj j" puts(a[1]); //prints properly..."QWE" a[1][1]='t'; //gives segmentation fault.... }[/CODE] what is the mistake in the code...??/..pls help..have an exam in 6 hrs...thank you....

Software Development c++
Member Avatar for IndianaRonaldo
0
348
Member Avatar for araib

How can u create a progress bar and a playlist for a custom media player??!! can anyone help??!!

Software Development
Member Avatar for araib
0
174
Member Avatar for Mike Bishop

i have a private sub that reads 4 lines of data from a text file, and then uses whats read and stores them in varibles. see below [CODE] Dim FileName As String = configfileV Dim TextFromTheFile As String ' Whole text Dim Lines() As String ' File splitted to lines …

Software Development dataset mssql vb.net
Member Avatar for dxider
0
259
Member Avatar for dimmu1

ok.. so im trying to make a function to find a par of cards with the same suit value for a game of 5 card poker. Here is what i have so far: my main: [CODE] int main (void) { /* initialize suit array */ const char *suit[4] = {"Hearts", …

Software Development c
Member Avatar for dimmu1
0
138
Member Avatar for GhostMonkey

Hey if I have a value that was p=3 in a for loop, and after a few loops it gets changed to p=6 is there anyway to say "go back to previous value"?

Software Development c++
Member Avatar for L7Sqr
0
1K
Member Avatar for agrarian

I am creating a Delphi program that needs to extract data from our database and create an Excel report. I would prefer to use the Delphi components TExcelApplication, TExcelWorkbook and TExcelWorksheet, but I haven't been able to get them to work. Most of the examples I have found are fairly …

Software Development delphi microsoft-office pascal
Member Avatar for Wolfgan
0
2K
Member Avatar for bluehangook629

I am trying to write a code which will combine these values and format it in the following format to be used as control/validation ID. I have written a line of code that will merge these values together into a long string but I can't get the zeros to fill …

Software Development vb.net
Member Avatar for bluehangook629
0
129
Member Avatar for montjoile

I´m trying to develop an avl tree in C++, but I have problems with my rotation algorithm. I have try ALL the algorithms I could find on the web, but none of they works and I can´t see where is the problem. Here is my structure: [CODE] typedef struct node{ …

Software Development algorithm c++ data-structure
Member Avatar for montjoile
0
294
Member Avatar for yongj

So I have a "base" class called "SortData". When I try to allow my other header file "InsertionSort.h" inherit this base class, I keep getting a class type redefinition error. What am I doing wrong? Here's the base class header: [CODE] // SortData.h #include <iostream> using namespace std; class SortData …

Software Development c++
Member Avatar for yongj
0
106
Member Avatar for terabyte
Member Avatar for d5e5
0
355
Member Avatar for loafie55

Create a program that is a Point of Sales (POS) system for a restaurant. Your POS system should allow unlimited orders from any number of guest. Each guest should be able to order a drink, an appetizer, an entree, and a dessert. The program should present a total. In addition, …

Software Development c c# c++
Member Avatar for loafie55
0
3K
Member Avatar for rockerjhr

main.c [CODE]#include "stack.h" #include "stack_interface.h" #include "lex.h" #include <stdio.h> #include <stdlib.h> #define PUSH(s,c) if(push_char(s,c) == ERROR){ printf("Fatal error in pushing symbol on stack.\n") ; exit(1) ; } #define POP(s,c) if(pop_char(s,c) == ERROR){ printf("Fatal error in poping symbol off stack.\n") ; exit(1) ; } #define TOP(s,c) if(top_char(s,c) == ERROR){ printf("Fatal error …

Software Development c storage
Member Avatar for Narue
0
259
Member Avatar for coding101

I have a directory with a bunch of stuff in it. when you say rm -r "the directory" you have to say yes,yes,yes,......20 times. Is there a script for just having the answer to all "are you sure you want to delete ...?" be yes? any scripting help, im new.

Software Development shell-scripting
Member Avatar for masijade
0
218
Member Avatar for basma.lm

hi, i'm using crystal report and my question is how to create a crystal report which displays fields from 2 tables. i tried this code but nothing displays in the report [CODE] SqlCeConnection con = new SqlCeConnection(); con.ConnectionString = @" Data source= |DataDirectory|\Database1.sdf"; con.Open(); Database1DataSet ds = new Database1DataSet(); SqlCeParameter …

Software Development open-source
Member Avatar for Shrushti
0
169
Member Avatar for Jake110

ok so im making a windows forms application in microsoft visual C# 2010. this is how i got it to change form: [CODE]page_2 page2 = new page_2(); page2.Visible = true; this.Visible = false; page2.SetDesktopLocation(50, 50);[/CODE] the form its on is page_1 and its going to page_2. this works fine, the …

Software Development
Member Avatar for Jake110
0
458
Member Avatar for james6754

Hi, I have added a SaveFileDialog to my project, to enable users to choose where they would like to save a txt file. I am using the Filter property to enable saving the file as a txt document, but when I run the project and the SaveFileDialog appears, the 'save …

Software Development
Member Avatar for james6754
0
320
Member Avatar for marrkee

hello, I'm almost done it, but I'm lost in the huge forest of c++... so, here's my code: [CODE]#include <iostream> #include <fstream> #include <time.h> #include <stdio.h> using namespace std; int gettime() { time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); } int …

Software Development c++ ios
Member Avatar for marrkee
0
144
Member Avatar for Jsplinter

I have a nested class declared as: [CODE]class A { class B { // members }; // members }; [/CODE] Is there a good way to avoid typing A::B every time I need to access B's members? I'd just like to do this in one .cpp file. I tried "using …

Software Development c++
Member Avatar for Jsplinter
0
225
Member Avatar for murnesty

[B]In main.cpp[/B] [CODE]#include <iostream> #include "init.h" using namespace std; Initialization Init; int main() { Init.test(); return 0; } [/CODE] [B]In init.cpp[/B] [CODE]#include <iostream> using namespace std; class Initialization { public: void test() { for(int i=0; i<10; i++) { cout<<i; } } };[/CODE] [B]In init.h[/B] [CODE]#ifndef INIT_H_ #define INIT_H_ class Initialization …

Software Development c++
Member Avatar for murnesty
0
146
Member Avatar for Shift_

I'm having another crack at python - and I am enjoying the clean simple syntax - but one thing I couldn't work out was how to read a line from a file until a '\t' character. How could I do this? It is a phone-book program and the data is …

Software Development python
Member Avatar for Shift_
0
747
Member Avatar for moose333

Hello I'm currently having a few problems with trying to read some data into an array and then workout the averages of all the data. I can read in all the data into an array line by line, the problem is I need to work out the averages of the …

Software Development
Member Avatar for Mitja Bonca
0
299
Member Avatar for muzikhera

I have my code on how to encrypt my app but i want my app to have be fixed encrypted app. For security purposes. Below is my code. [CODE]try { Configuration config = ConfigurationManager.OpenExeConfiguration(exeConfigName); ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection; section.SectionInformation.ProtectSection("DataProtectionCOnfigurationProvider"); config.Save(); Console.WriteLine("Protected = {0}", section.SectionInformation.IsProtected); } catch (Exception ex) …

Software Development
Member Avatar for zachattack05
0
141
Member Avatar for ahp@aol.in

Hi, I've confusion with static member variable in c++ class. Please have a look on following code. class test { public: static int i; float j; }; int test::i = 0; int main() { test *t = new test; test::i = 100; cout << "test::i = " << test::i << …

Software Development c++
Member Avatar for ahp@aol.in
0
417
Member Avatar for arun srinivaas

Hi Guys. I tried creating an insert into tree datastructure which is causing core dump. Please identify the issue... Here is the code [code] #include<iostream> #include<string> #include<stdlib.h> using namespace std; //Global Data struct Tree { Tree* right; Tree* left; int element; }; typedef struct Tree* TreeData; //Function Declaration void insert(TreeData …

Software Development c++
Member Avatar for hag++
0
142
Member Avatar for SWEngineer

I noticed that the main.cpp in a Qt application has to contain the following line: QApplication app(argc, argv). I know that argc is the number of command-line arguments, and argv is that array list of command-line arguments. But, the question in my mind is: what are those arguments I'm passing …

Software Development c++ qt
Member Avatar for Caligulaminus
0
218
Member Avatar for geekme

While running all codes in visual c++ it gives me the same error -"Error 1 fatal error C1083: Cannot open include file: 'test.h': No such file or directory c:\users\ila\documents\visual studio 2008\projects\game\game\testgame.cpp 1 " I have created the header file test.h.

Software Development c++ visual-studio
Member Avatar for hag++
0
77
Member Avatar for sing1006

[CODE]#include<iostream.h> int tripeCallByValue(int count1) void main(){ int count=2; cout<<"count is "<<count<<endl; cout<<"count1 is "<<count1; } int tripeCallByValue(int count1){ count1=count*3; return count1; }[/CODE] when i compile with compiler,i got a syntax error.but i didnt where i have did worng.

Software Development c++
Member Avatar for Fbody
0
187
Member Avatar for xanawa

Form 1 contains label1 and buttonOk (form1 NOT closed) on buttonOk click the opens Form 2 Form 2 contiant a numericupdown and button1 on button1 click value of numericupdown should be displayed in label1 i tried to do this using the constructor and did not work.. help pls

Software Development
Member Avatar for xanawa
0
101

The End.