132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for cyberguy007

[CODE]# include <stdio.h> # include <stdlib.h> # include <string.h> # include <conio.h> typedef struct{ int a[99]; }number; const int max = 99; int main () { number array; int j; int count = 0; for ( j= 1; j <=max; j++ ){ count = count +1 ; array.a[j] = count; …

Software Development c
Member Avatar for Dave Sinkula
0
76
Member Avatar for Der_sed

Can someone please suggest me a psuedo code to extract sub problems from an arithmetic expression: For example, How do I remove (8*2) and (3+2) from a given string (5 + 6(3+2) - 2(8*2) +1) Input string will always start and end with paranthesis and the sub problems must be extracted …

Software Development c++
Member Avatar for WaltP
0
87
Member Avatar for Frederick2

Recently I've been looking into BSTRs, and have found how 'touchy' they can be. I saw this in a COM class in the class destructor regarding a m_strBStr member... [CODE] if(m_strBStr) SysFreeString(m_strBStr); [/CODE] When I saw it I thought, "How would the BSTR have a zero assigned to it?", because …

Software Development c++
Member Avatar for Fbody
0
148
Member Avatar for yznk

Your assignment is to modify the program so that the aimless walker stumbles around in a 2-dimensional grid, such as the streets of Manhattan. Your program should prompt the user to enter the number of rows and columns in the 2-d grid. Again, have the walker start in the middle …

Software Development c++
Member Avatar for jonsca
0
110
Member Avatar for LevelSix

I need to write a program that draws the next iteration if a koch snowflake, when a button is clicked. It begins with a equilateral triangle. The program uses an ArrayList, Polygon, and GeneralPath, as I found these imports in the starter code. I think I may also be supposed …

Software Development java java-swing
Member Avatar for BestJewSinceJC
0
962
Member Avatar for nats01282

Hello i am watching some tutorials on [URL="http://www.3dbuzz.com/vbforum/sv_showvideo.php?v=27"]3d Buzz[/URL] and intro to C++ starts by saying that [CODE] #include <iostream> main () { std::cout << "hello world!" << std::endl ; } [/CODE] should show a CMD like window saying Hello World! On the video they try it and it works …

Software Development c++ visual-studio
Member Avatar for nats01282
0
148
Member Avatar for indigo.8

Hi guys having a single problem with some code. The program is statically linked to another which is suppose to take an input from a text file into an array; and then return a pointer to the array to the main program. The text file contains 10 ints one per …

Software Development c++ file-stream ios
Member Avatar for indigo.8
0
114
Member Avatar for photoyid

[CODE]#include<iostream> using namespace std; class point{ private: double x,y; public: double getX(); double getY(); void set(double c, double d); }; class polygon{ private: string color; public: void setc(string color1){ color = color1; } void print(){ cout<<color; } string getColor(){ return color; } }; class triangle: public polygon{ private: point v1,v2,v3; …

Software Development c c# c++
Member Avatar for photoyid
0
171
Member Avatar for lismoker

I am setting up a program that will read multiple lines of data from an input file. I am able to get it to read the first line (there are 6 lines of data) but I can not get it to loop. Also I am unable to get the floor …

Software Development c++
Member Avatar for Fbody
0
139
Member Avatar for frank_hugo_1100

i have a problem with using the parallel port to output signal to control devices or to receive data . i know that winxp restrict access to the port, so i downloaded the inpout32.dll and i put it in the system32 folder then i used the inport ,outport functions but …

Software Development c
Member Avatar for frank_hugo_1100
0
152
Member Avatar for TheWolverine

Hi all, I have a simple mathematical series that I need to expand fully and I am not sure what the most efficient way is of achieving this. I know I can write a for-loop quite simply to do this but I don't know if a solution already exists in …

Software Development c++
Member Avatar for dusktreader
0
150
Member Avatar for Robyy14

Hey I am pretty new to c++ and algorithmic , so please try explaining me what to do or give me a code for example don't redirect me to a site that already made a library for this because you only wasted your time telling me that. For example i …

Software Development c c# c++
Member Avatar for dusktreader
0
147
Member Avatar for its_yogy

[code] // This is My Client TCP program in C++ // Program Name client.cpp #include <winsock2.h> #include <iostream.h> #include <windows.h> #include <iomanip> char szServerIPAddr[ 20 ] = "192.168.5.251" ; // IP address of my Server int nServerPort = 5000 ; // The server port that will be used by clients …

Software Development c c++ client-server data-structure
Member Avatar for WaltP
0
303
Member Avatar for madmonkey

I'm trying to make a button to open a new form in a Win32 Forms App. Lets say the form I'm opening is called Form2 and the button is called button1. Any help will be greatly appreciated.

Software Development c++ windows-api
Member Avatar for madmonkey
0
120
Member Avatar for rena0514

[code] import javax.swing.JFrame; public class Demographics { public static void main(String[] args) { JFrame frame= new JFrame("Survey"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new DemographicsPanel()); frame.pack(); frame.setVisible(true); } } [/code] [code] import java.awt.*; import javax.swing.*; public class DemographicsPanel extends JPanel { public DemographicsPanel() { this.setLayout (new BorderLayout()); //Panel 1 (North) JPanel panel1 = new JPanel(); …

Software Development java java-swing
0
114
Member Avatar for TheWolverine

Hi all, I'm busy coding up some classes now and I was wondering if there is any danger in using a variable name twice, if the variable is limited to local scope. For instance, let's say I have the following piece of code: [CODE] class Foo { void function1( double …

Software Development c++
Member Avatar for Fbody
0
293
Member Avatar for cricket2030

Hello, I am taking a VB.net class and am having trouble seeing the difference between event driven and object oriented programming. This will not help on any assignments, I have already turned it in, but I do not understand why VB6 is considered event driven and .NET is object oriented. …

Software Development asp.net vb.net visual-basic
Member Avatar for cricket2030
0
126
Member Avatar for leverin4

I want a certain subroutine to run if the user clicks the red close button in the top corner of the form. Is there a subroutine similar to Form_Load() when the form is opened that will do this for me? Thanks in advance

Software Development visual-basic
Member Avatar for WaltP
0
83
Member Avatar for anthony5557

Can anyone help me tweek my code. This program is supposed to get the day number 1 through 365 from the user and display the corresponding month and day. I'm getting so many errors I don't know how to start or really decipher the error in C++. Here is my …

Software Development c++
Member Avatar for Fbody
0
209
Member Avatar for TinoMclaren

Helo all: I have two dataGridViews on a form and id like to be able to extend the multiSelect property across both if them. i.e. Id like to be able to hold down the ctrl key and click in dgv A AND dgv B and for them to hold those …

Software Development
Member Avatar for TinoMclaren
0
96
Member Avatar for sblass92

I'm trying to overload the << operator for a class (easy, right? :P) However, I get the linker error: undefined reference to `operator<<(std::ostream&, particle const&)' Which my understanding means the compiler can't find the implementation for operator<<. I'm not sure whats going on here, since I've already implemented the function. …

Software Development c++
Member Avatar for sblass92
0
182
Member Avatar for Pugee

[CODE]//Converter //Thursday 25 2010 7:16pm #include <stdio.h> #include <stdlib.h> int main () { int i; char buffer [33]; printf ("Enter a number: "); scanf ("%d",&i); itoa (i,buffer,10); printf ("decimal: %s\n",buffer); itoa (i,buffer,2); printf ("binary: %s\n",buffer); system("pause"); return 0; }[/CODE]

Software Development c
Member Avatar for WaltP
0
107
Member Avatar for suncica2222

Can I get some link or reference how to pass strings between two .exe's through their resources? In C++ of course.

Software Development c++
Member Avatar for suncica2222
0
88
Member Avatar for templersstorms

Ok, I am trying to to make a double-click action when you click on a cell or row, within a dataGridView. The end goal is to have the single click select the whole row so that when you double-click any cell in the row it will load that row into …

Software Development dataset xml
Member Avatar for Geekitygeek
0
5K
Member Avatar for dagelmyster

I am having no trouble playing a swf file in VB but how can a play a second SWF file AFTER the first has finished? How do I know when the first file is done playing? Tried 'isplaying' method in a while loop but can't get it to work. Thanks …

Software Development vb.net
Member Avatar for dagelmyster
0
82
Member Avatar for beforetheyknew

Hi guys, I'm really new to graphics and im trying to pick it up but struggling with a few points. Can someone provide some code on how i can set where a graphics shape should be created/spawn? eg like (32, 11) 32 pixels on the horizontal axis and 11 pixels …

Software Development java
Member Avatar for Ezzaral
0
121
Member Avatar for ChPravin

Hello All, I am getting concurrent modification exception while I have only a single main thread running.I am not sure why I am getting this exception.I tried to put final keyword before the iterator in the abpve code snippet and also tried to synchronize access to the lists but nothing …

Software Development java
Member Avatar for ChPravin
0
105
Member Avatar for Eternity[LK]

Hello. What I have to do is: Take the first half of the input, and output it backwards. Length of the input is 10 or less. Examples: 123456789 - entered by user; 54321 - result. abcde - entered by user; cba - result. The catch is, that I can only …

Software Development c++
Member Avatar for Eternity[LK]
0
116
Member Avatar for Cort3z

Hi, I'm trying to set a double-value, but somehow it does not take my statements. This is what I got: [CODE] public double getDouble() { return aDoubleValue; } public double getAnothertDouble() { return aDoubleValue2; } public void myMethod(MagicObject a) /* Some magic */ //Here lies the problem: (FX is a …

Software Development java
Member Avatar for Cort3z
0
96
Member Avatar for mikabark

Hello .. I 'm doing sha1 program. I don't know why this source result show below errors. sha3.cpp:11: error: invalid conversion from ‘unsigned char*’ to ‘const char*’ sha3.cpp:11: error: initializing argument 1 of ‘size_t strlen(const char*)’ Thanks you. [CODE][/CODE] [CODE]#include <stdio.h> #include <string.h> #include <openssl/sha.h> int main() { int i; …

Software Development c++
Member Avatar for Clinton Portis
0
3K
Member Avatar for bobbuilder67

Hello Everybody, For a sorting project I'm working on, I have a string array, with 50 values. I need to convert each string in the array to a two dimensional char array. For example, Let's say there is a string array[50]. Each position in the array has a name in …

Software Development c++
Member Avatar for Fbody
0
119
Member Avatar for jamesbraders

Hi, I am currently writing a program that requires me to take values from a text file and store them in an 2d array, I am quite new to c++ programming so I am not sure how to do it. My text file (posvalues.txt) looks like this: 0 0 0 …

Software Development c c# c++
Member Avatar for jonsca
0
268
Member Avatar for veronica_0501

I have to count characters, words and lines from a text file. I am able to count characters and lines but not words. This code is error-less, but the output for words always appear 0. Anyone able to help me see what's wrong and provide a way out? And I …

Software Development c
Member Avatar for gerard4143
0
139
Member Avatar for gplkrsna

Hi, Problem: I have two libraries with two different queue implementations. but with same structure name as "queuetype". Now if I include both of the header files in my code, compilation will go for toss saying "error: conflicting types for 'queuetype' " I need to include both the files. How …

Software Development c queue
Member Avatar for Narue
0
125
Member Avatar for Chichiro

Hi all , i recently has read about some posts related to the above title , but i'm really confused about it,sadly :( What is the real difference between programming and software engineering? Which one should i go for ? If i took software engineering , could i be a …

Software Development c++ engineering
Member Avatar for Chichiro
0
387
Member Avatar for bertyhell

i made a jtable in java with 2 columns when i select some rows and click a button it should get the selected rows but this array comes back empty here are some sniplets [CODE] JScrollPane scroller = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); scroller.setBorder(null); this.add(scroller,BorderLayout.CENTER); customers = new JTable(); scroller.setViewportView(customers); customers.setAutoCreateRowSorter(true); customers.setModel(new …

Software Development java
Member Avatar for bertyhell
0
576
Member Avatar for baki100

What method / methods should be be used in order to get the frame to start up in a central position of the screen, and could you also provide the code please. I'm using wxPython. thanks

Software Development python
Member Avatar for baki100
0
274
Member Avatar for kgkamaraj

Hi. I am passing different kind of text file and calling same function.. Can any one know how to avoid these repeated code. [CODE] public static void main(String[] args) throws IOException,NullPointerException { MultipleLinearRegrssionModel fex = new MultipleLinearRegrssionModel(); //Calls Read From File //First ocument docsum=1; fex.readFromFile("f:/project/document/training/1.txt"); //Calls compare training corpus and …

Software Development java
Member Avatar for kgkamaraj
0
210
Member Avatar for polska03

I am only showing the spaceport and fileIO. I want the first line of my txt file to show the number of spaceship to create an array then choose what type of spaceship. I did the best i can and now i am completly stuck its not working. Can Someone …

Software Development file-system java
Member Avatar for javaAddict
0
143
Member Avatar for kohkohkoh

can i know how to save a file name based on the user's input for example: Enter your name : Derrick then i save this input to a file .txt named derrick (derrick.txt) how can i do it? i only know how to use the rename() and delete() function...in the …

Software Development c file-system
Member Avatar for DoEds
0
129
Member Avatar for NAGASAKI

When I look at a statement, how can i tell whether it's an accumulator or a counter?

Software Development vb.net
Member Avatar for J-eezy
0
94
Member Avatar for london-G

Hello I need ideas of how to create my project. I am supposed to create a map and shows description of each cities. So i have put buttons on each cities on the map and when the user clicks on a certain city he/she should see the description of it …

Software Development visual-basic
Member Avatar for london-G
0
885
Member Avatar for viking3579

Hello I'm trying to get a jTextField to be updated by another class however the validate() and repaint() aren't working. However, it is saying that the text has been changed for my jTextField. Below is the code could anybody explain to me why its not updating the repainting the jTextField …

Software Development java java-swing
Member Avatar for gangsta1903
0
423
Member Avatar for sandyben

Hi..I basically new wit java. i have a program called Transfer.java..n when i press button caleed "start Transfer" it executes FileServer.java [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.Random; import java.util.*; import java.text.*; import java.rmi.*; class transfer extends JFrame implements ActionListener, Runnable { JButton btntrans,btnexit; ImageIcon bc; …

Software Development java java-swing
Member Avatar for gerdonhanry
0
154
Member Avatar for Ghost

Hi Everybody, I was wondering how to make a java image editing application. Basically, I really want to make a program that allows the user to drag and stretch images. I don't want the code. I'm only in search of a decent tutorial. Thanks in advanced for your help.

Software Development image java
Member Avatar for manojnbn
0
2K
Member Avatar for ahp@aol.in

Hi folks, Using shell script I'm running two java applications at background. The output of 'ps -ef' is UID PID PPID TTY STIME COMMAND Amar 2388 1 con 15:35:58 /usr/bin/bash Amar 1272 1 con 15:44:29 /cygdrive/c/Program Files/Java/jdk1.6.0_01/bin/java Amar 3972 1 con 15:44:55 /cygdrive/c/Program Files/Java/jdk1.6.0_01/bin/java Amar 1600 2388 con 15:46:12 /usr/bin/ps …

Software Development java shell-scripting
Member Avatar for masijade
0
409
Member Avatar for wolfkrug

Hi I use visual studio to make my programs. I know that to copy the output of the program, you have to right click, mark, highlight, and then copy. But almost all the time when I try to paste nothing happens, and by that time the output box disappreared so …

Software Development c++ visual-studio
Member Avatar for wolfkrug
0
108
Member Avatar for noora000

Hello, Could you please help me in writing a code for sending an e-mail in c#... Regards..

Software Development
Member Avatar for maryjessicka
0
226
Member Avatar for kohkohkoh

I saw there is some code in C# where it can do copy and paste and also does the automation typing in a textbox or file.. (not using fieldname.text = "value" ) it seems using some system.window.input. you guys got the link or resources? your kindness is very much appreciated! …

Software Development
Member Avatar for kohkohkoh
0
90
Member Avatar for Sobakaa

Hello everybody! I've wrote a very simple echo server, based on a book about LInux socket programming example and it works just fine. My only problem is that i want to use select() function to handle several connections at one time. I've read lots of reference concerning that function and …

Software Development c socket-programming unix
Member Avatar for Sobakaa
0
236

The End.