132,726 Archived Topics
Remove Filter ![]() | |
[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 | |
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++ | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
[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; … | |
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++ | |
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 | |
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++ | |
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 … | |
[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 | |
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 | |
[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 | |
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++ | |
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 | |
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 | |
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++ | |
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 | |
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++ | |
[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 | |
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++ | |
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 … | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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++ | |
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++ | |
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 … | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
![]() | 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 |
When I look at a statement, how can i tell whether it's an accumulator or a counter? Software Development vb.net | |
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 | |
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 | |
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 | |
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. | |
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 | |
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 | |
Hello, Could you please help me in writing a code for sending an e-mail in c#... Regards.. Software Development | |
![]() | 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 ![]() |
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 |
The End.