132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for PSP1202

Hey all! I'm new to C++ and am having trouble with the Do...While loop terminating. My problem is I want the loop to end when the user enters 'X' when asked for an operation. When 'X' is entered it still asks for a number and then displays the current total …

Software Development c++
Member Avatar for WaltP
0
102
Member Avatar for prushik

I have written a program for a linux box running on a davinci (arm processor). The program communicates with a server over the lan, calls some scripts, and delays different amounts of time depending on what the server tells it to do. It all works great, most of the time. …

Software Development c
Member Avatar for prushik
0
269
Member Avatar for bgx90

Hello. I am creating a template class derived from another template class to basically mimic the behavior of the STL stack for a school project. I am getting a compile time error when try to use a variable named "copy" when testing the overloaded '=' (defined in the base class) …

Software Development c++ data-structure linked-list
Member Avatar for bgx90
0
114
Member Avatar for josolanes

I'll do my best to be as clear as possible about what I'm trying to do. In short, I'd like to know if a switch statement can check multiple variables simultaneously (I have a feeling it can't, but I'd like to confirm). If it can't, can someone recommend a way …

Software Development c++
Member Avatar for josolanes
0
2K
Member Avatar for matharoo

I am making Railway reservation sys. i want to pass these set of statements into a function how can i do that???? I have used structures in the program... [CODE]cout<<"--TICKET SUMMARY--"<<endl; cout<<"Passenger Name :"<<o2.pass_name<<endl; cout<<"Age :"<<o2.age<<endl; cout<<"Sex :"<<o2.sex<<endl; cout<<"Train Name: "<<o1[x].train_name<<endl; cout<<"Arrival Time: "<<o1[x].t_arr.hrs<<":"<<o1[x].t_arr.min<<endl; cout<<"Departure Time: "<<o1[x].t_dep.hrs<<":"<<o1[x].t_dep.min<<endl; cout<<"Seat Class: 2A"<<endl; …

Software Development c++
Member Avatar for Ancient Dragon
0
137
Member Avatar for nizbit

I need some dire help. Whenever I execute my program I get this message "./main: free(): invalid next size (fast)". Which leads me to believe something with my dynamic allocation of an array. I've used a debugger and pinpointed the error to the method where I'm trying to increase the …

Software Development c++
Member Avatar for tetron
0
313
Member Avatar for ehsun7b

I'm using NetBeans 6.8 + MinGW + MSYS I try to develop a simple Winodws application e.g: [CODE] #include <windows.h> int WinMain(HINSTANCE,HINSTANCE,LPSTR,int) { MessageBox(0,"Hello, Windows","MinGW Test Program",MB_OK); return 0; }[/CODE] Or something like this: [CODE] #include <windows.h> char *AppTitle="Win1"; LRESULT CALLBACK WindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); int …

Software Development c++
Member Avatar for Ancient Dragon
0
156
Member Avatar for Acute

hi everyone, i'm new in c#, so i have some questions: i have this piece of code: [code=c#]Graphics gfx = this.CreateGraphics(); Pen myPen = new Pen(Color.Azure, 1.0f); Rectangle myRec = new Rectangle(10, 10, 30, 30); gfx.DrawRectangle(myPen, myRec);[/code] and i want the rectangle myRec appear on the form1 when i press …

Software Development
Member Avatar for Geekitygeek
0
409
Member Avatar for Ciarant

import java.awt.*; import java.awt.event.*; import java.io.*; public class StudentWriteApp extends Frame implements ActionListener { //Declare stream objects FileOutputStream outputStudent; //Stream to create file ObjectOutputStream objSaveStudent; //Stream to save an object //Declare components TextField txtStudentName = new TextField(20); TextField txtAddress = new TextField(20); TextField txtResults = new TextField(25); Button btnSave = …

Member Avatar for Ciarant
0
196
Member Avatar for scru

Does anybody know of any libraries or scripts or even code snippets that can generate HTML code from a diff or comparison of the contents of two files? I know of the HtmlDiff class in difflib, but the format it outputs is not the one I want (it puts both …

Software Development html-css python
Member Avatar for scru
0
117
Member Avatar for CreativeCoding

So I'm making this program, and this is what I have so far [CODE]private: System::Void load_Click(System::Object^ sender, System::EventArgs^ e) { outs("ComputerName", SystemInformation::ComputerName); outb("Network", SystemInformation::Network); outs("UserDomainName", SystemInformation::UserDomainName); outs("UserName", SystemInformation::UserName); outbm("BootMode", SystemInformation::BootMode); outi("MonitorCount", SystemInformation::MonitorCount); outb("MonitorsSameDisplayFormat", SystemInformation::MonitorsSameDisplayFormat); outad("ArrangeDirection", SystemInformation::ArrangeDirection); outb("MousePresent", SystemInformation::MousePresent); outb("MouseButtonsSwapped", SystemInformation::MouseButtonsSwapped); outb("UserInteractive", SystemInformation::UserInteractive); outr("VirtualScreen", SystemInformation::VirtualScreen); } public: System::Void outs(String^ x, String^ …

Software Development c++
Member Avatar for tetron
0
150
Member Avatar for sblass92

I'm trying to declare a vector as a global variable, and am getting a linker error. I read up on linker problems with multi-file projects, pretty sure I've included the proper headers, used extern, and #ifdef properly, but I can't get it yet. Here is what we have: [CODE] //in …

Software Development c++
Member Avatar for sblass92
0
113
Member Avatar for abhimanipal

Hello Everybody, Most of my coding experience is in C. Although I have a background in C++, I know very little of STL and the advanced topics in C++. I came across this code [code=c++] struct g { g():n(0) { } int operator()() { return n++; } int n; }; …

Software Development c++
Member Avatar for mattjbond
0
160
Member Avatar for domingo

hi i have a problem with datagridview. I have about 5 datagridviews displaying different items. Now my issue is that how will i know which datagridview the user selected and add from that datagridview only? at the moment the user can add from different datagridviews because the first row of …

Software Development
Member Avatar for domingo
0
140
Member Avatar for Learning78

Hi; I have an edit control that takes string input from user and a CButton 'Record' to record that input. I want to catch the control and disable it when the user input is empty. I want to make sure that this enable/diable happens with the click of Record CButton. …

Software Development c++
Member Avatar for Learning78
0
2K
Member Avatar for Acute

hi everyone, i'm new in c# and events handling techniques, and i have a problem: how can i call paint event inside of mouseclick event? [code=c#] private void Form1_MouseClick(object sender, MouseEventArgs e) { Form1_Paint(?, ?); //i need something like this... } [/code] i want to move rectangle(paint event moves it, …

Software Development
Member Avatar for Acute
0
3K
Member Avatar for FlippA

Hi all, I am creating a Genetic Algorithm, and I have two Arrays contain int values, I would like to know a easy way of Split each array into 4 random sections e.g. Array 1 = [1| 4 5 3| 1 4 |6 7 8| 1] Array 2 = [2| …

Software Development algorithm
Member Avatar for Geekitygeek
0
135
Member Avatar for TofiLuk

Hi I have a problem with this code. I'm trying to save a values in the database.. When I click the save button the table is being updated and showing the new values I entered. But the problem is it is not actually saved in the database, when I re-run …

Software Development vb.net
Member Avatar for TofiLuk
0
123
Member Avatar for EddieC

Are you a certified function point specialist or play one on TV? Then the Counting Practices Manual version 4.3 might be for you. Unveiled today by the [url=http://www.ifpug.org/]International Function Point Users Group[/url] (better known as IFPUG), the $100 CD contains the latest "body of knowledge used by function point analysts …

Software Development c++
Member Avatar for Marcio Silveira
0
380
Member Avatar for PDB1982

I am trying to create a rational numbers program from scratch (I'm a brand new student basically), and I have all my inputs working right now. My problem lies within my showFraction() function, but I can't figure out how to fix it. It should output the inputs from the user …

Software Development c++
Member Avatar for tetron
0
530
Member Avatar for memo1

Hi , I'm a new learner of Java I start study Java since 2 weeks one of my friends challenge me to type program that show the number which I enter , It's even or odd . could you help me about the main things ,,,

Software Development java
Member Avatar for javaAddict
0
116
Member Avatar for Interesting_Hat

Hello, I have been stuck with a C program, which I have to write for my foundation degree. I know it's simple, but can't seem to wrap my head around it. Write a program that uses a For loop to: Input three float numbers less than 20 Cube each one …

Software Development c
Member Avatar for stratsp
0
135
Member Avatar for muthuivs

Hi Guys/Gals, I am writing a program that needs the user to scan in documents using either adobe or the software provided by the scanner makers (such as travelscan pro, etc). My program needs to have have button that says "SCAN DOCUMENT", and when it is pressed I need the …

Software Development adobe vb.net visual-basic
Member Avatar for kinwang2009
0
391
Member Avatar for Adrian99420

Hi, I created a combobox and binded it with MS access table using following code: [code] this->oleDbDataAdapter1->SelectCommand->CommandText="SELECT DISTINCT Profile_Name FROM Profiles"; this->oleDbDataAdapter1->Fill(dataSet1,"Profiles"); DataTable^dt= dataSet1->Tables["Profiles"]; comboBox1->DataSource= dt; comboBox1->DisplayMember = "Profile_Name"; [/code] I got the correct profile name I needed in the combobox. I tried it using textbox, textBox1=comboBox1->SelectedItem->ToString(); However,it always return …

Software Development c++
Member Avatar for dittukumar
0
197
Member Avatar for DoEds

I found this code somewhere on the net... But i dunno how to stop this...Its keeps animating and i dont know when will this stop... [CODE]#include <stdio.h> #include <time.h> void sleep ( long milli ) { clock_t end, current = clock(); for( end = current + milli; current < end; …

Software Development c c# c++
Member Avatar for jonsca
0
114
Member Avatar for 28daniela28

Hi, I'm trying to end a project that should do next points: -generating a random vector ( for that I have the function generareVector); -reading the vector from the file where it was generated ( citireVector); -sorting the vector using different methods of sort; -checking if the resulted vector was …

Software Development c++
Member Avatar for tetron
0
196
Member Avatar for bmasta12

hi im currently working on a grade book tool for teachers im a beginner im trying to just simply have the user click the button on the current page there on to open an existing window that ive already created this is the code i use [code] private void PROFILE_Click(object …

Software Development
Member Avatar for Geekitygeek
0
112
Member Avatar for garyinspringhil

[CODE]x = self.spinbox37.value() * 40 y = self.spinbox38.value() * 40 printer = str(self.comboBox4.currentText()) print_cmd = 'echo "IN;PU" x "," y | lpr -P %s %s' self.LCDNumber18.display(x) self.LCDNumber19.display(y) #print_cmd = 'echo "IN;PU2100,11300;" | lpr -P %s %s' os.system(print_cmd % (printer, ""))[/CODE] In the above line I'm trying to use the x …

Software Development os-x printer python
Member Avatar for garyinspringhil
0
130
Member Avatar for emilio

hi I'm new to outlook add ins. i developed an outlook 2007 add in project and added a setup project so i will be able to install the add in to other computers. when i install the add in (using the installer from the setup project) it works fine on …

Software Development visual-studio
Member Avatar for emilio
0
107
Member Avatar for endframe

Hi everyone. So here's the case, I am a newcomer in C++ and I have been working on a small begginers program ; it adds 2 numbers after adding 1 to each of those 2 numbers . Let's say if we put 4,5 then it will add 1 to both …

Software Development c++
Member Avatar for BrianWren
0
234
Member Avatar for astronomical

All, Basically what you have here is a PART of my program. Here I am supposed to get the LENGTH of a rectangle from a user and return that length to the main method for further use. My program works fine if I take out the input validation but I …

Software Development java
Member Avatar for javaAddict
0
137
Member Avatar for P.manidas

Dear Sir/Madam, I have developed a software on game using VB 6.0 and Access, and I want to make that software as a Register Version. The software may ask the user for registration key at the time of installation or after specified period of time being installed. I can make …

Software Development visual-basic
Member Avatar for kinwang2009
0
329
Member Avatar for johndoe444

The following code fragment from Programming Pearls: [CODE]for i = [0, n) if comlen(a[i], a[i+1]) > maxlen maxlen = comlen(a[i], a[i+1]) maxi = i[/CODE] I am not sure why he called the comlen function twice? Instead he could save the computed value in a temporary and use it to assign …

Software Development c++ perl
Member Avatar for rdxblast
0
132
Member Avatar for suave_sak

how to create a new excel file on click of a button in java?

Software Development java
Member Avatar for masijade
0
79
Member Avatar for Egypt Pharaoh

How to get color inverse like black(00 00 00) be white (FF FF FF) red(FF 00 00) be (00 FF FF)

Software Development
Member Avatar for ddanbe
0
81
Member Avatar for samurai1200

In C++ using gc++ compiler (netbeans, ubuntu), I am trying to pass a struct into a function (working fine), operate on an array in the struct (fine). But when I leave the function (which is void return value), the struct values snap back to their initialized values. the struct in …

Software Development c++ ubuntu
Member Avatar for samurai1200
0
1K
Member Avatar for HelloMe

Oje me again... :$ Hello everyone... I have a superclass Human and a subclass Warrior. Problem is, human got this method: [code] public void Reveal() { System.out.println("I am " + name + ". "); System.out.println("My Strength is " + strength + " my Health is " + health); System.out.println("My Intelligence …

Software Development java
Member Avatar for HelloMe
0
119
Member Avatar for Idontknowc

I have to now make a simple single line text editor where the letters i type i can use commands to edit them this is what I started with my knowledge and so far ive got typing happening, if its possible to just input commands that can change the lines …

Software Development c
Member Avatar for Ancient Dragon
0
121
Member Avatar for GAME

I've tried google and this site but cant seem to find anywhere to start? I'm trying to make a character limit one then automaticaly go to the next open text box.

Software Development
Member Avatar for RunTimeError
0
113
Member Avatar for Duncans Ghola

I have been assigned to implement a string class and I am having a hard time with the >> operator overload. Header File: [CODE]std::istream& operator >>(std::istream& ins, obstring& target);[/CODE] Implementation: [CODE] std::istream& operator >>(std::istream& ins, obstring& target) // Postcondition: A string has been read from the istream ins, and the …

Software Development c++
Member Avatar for Duncans Ghola
0
160
Member Avatar for HelloMe

Hello everyone... For now i have build a Human class and i want to test it now but on 2 lines there is an error and both errors states "void expected". I have a main function in my class but later i gonna remove it because i want this Human …

Software Development java
Member Avatar for HelloMe
0
115
Member Avatar for Suhas H G

Hi, My self Suhas H G, I need to merge the data from one xml file into the another xml file(At the end of this xml file). Please share the working code if any one has. Thanks in advance!!! Suhas

Software Development xml
Member Avatar for kvprajapati
0
60
Member Avatar for rahulrulez

Hello, I'm working on my project "The Vending Machine Software" Here I need to use Graphics and mouse handling.. I'm totally new into Mouse programming in C++, still doing the coding with help of some online tutorials.. What I've to do is, Show a welcome page first when I run …

Software Development c++ engineering
Member Avatar for rahulrulez
0
185
Member Avatar for digonio

Hi, I am a complete newbie and these are the first lines of code that I write, so please be patient :( I need to create a C# exe file that calls a c++ function What I wrote always throws an error at runtime: [code]Unhandled Exception: System.AccessViolationException: Attempted to read …

Software Development c++
Member Avatar for kvprajapati
0
219
Member Avatar for ab_too

Hi, I have jest started learning Python. I would like to get some help on writing a script that would delete a data of lines only key from array which looks like this : [CODE]['192.168.255.1 00:01:02','[COLOR="Red"]172.14.0.1 00:0f:01','172.14.0.1 01:ff:dd:34'[/COLOR] ,192.168.255.3 00:dd:01:ff[/CODE] [B] I want delet red data only [/B]

Software Development python
Member Avatar for ab_too
0
717
Member Avatar for nanosadra

struct Employee { /* Employee details */ char name[MAX_NAME_LENGTH+1]; /* name string */ char sex; /* sex identifier, either 'M' or 'F' */ int age; /* age */ char job[MAX_JOB_LENGTH+1]; /* job string */ struct Employee *prev, *next; }; static void menu_add_employee(void) { static struct Employee *employee_list = NULL; { …

Software Development c linked-list
Member Avatar for Adak
0
214
Member Avatar for Stefano Mtangoo

I'm reading casting functions(I wonder if this is proper name). I get difficult grasping dynamic_cast, static_cast, constant_cast and reinterpret_cast. Can anyone help me in "layman" terms differences and where we may use them? [URL="http://www.cppreference.com/wiki/start"]reference[/URL] and [URL="http://google.com"]google[/URL]

Software Development c++
Member Avatar for Stefano Mtangoo
0
66
Member Avatar for spetsnaz26

I'm programming using Visual Studio 2005 with Intel's Cilk SDK installed and learned there were some bad writing/reading happening at some specific memory locations, such as 0x00254c0( I can't remember the exact location, this is only an example). I have no idea what is going on at those locations and …

Software Development c++ visual-studio
Member Avatar for spetsnaz26
0
120
Member Avatar for Gnawk

#include <iostream> using namespace std; bool isPrime (int num) { int counter=0; { for(int i=1; i<=num ; i++) if (num%i==0) counter++; if (counter==2) return true; } return false; } //prints primes void printPrimes (int num) { for(int i=2;i<=num;i++) if (isPrime(i)) cout<<i<<","; } // if there is no prime number between …

Software Development c++
Member Avatar for Gnawk
0
128
Member Avatar for strmstn

Hello there. I don't know if this should actually be posted in any of the C/C++ forums, but it is mainly an Assembly question so I take my chances here. In C/C++ it is possible to declare local variables as: [CODE=C]if(statement){ int var; // Use of the variables }else{ // …

Software Development assembly c c# c++
Member Avatar for strmstn
0
204

The End.