132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for timbomo

i cant get this to loop and i cant get it to error trap cout << " Please choose an odd number 3-9 to calculate width and height of your choosing\n"; cin >> number; [CODE]do { if((number!=3) || (number!=5) || (number!=7) || (number!=9)) { cout << "invalid choice " <<endl …

Software Development c++
Member Avatar for Fbody
0
250
Member Avatar for iNach

Hey, I have a problem. I want that when the user presses the ESC Key, my program will send him a message if he sure he wants to exit the program. [b]Basicaly what I need help with is how to do the "IF Esc is pressed"[/b] Thanks

Software Development c
Member Avatar for xavier666
0
8K
Member Avatar for xavier666

I just received the MERGE SORT code from my friend, here it is [CODE]void sort_merge (int *array, int low, int high) { int mid; if (low < high) { mid = (low + high) / 2; sort_merge (array, low, mid); sort_merge (array, mid + 1, high); array_merge (array, low, high, …

Software Development c
Member Avatar for xavier666
0
4K
Member Avatar for daviddoria

I am trying to get a variable number of arguments in one function, and pass them to another function. I tried this: [code] #include <iostream> #include <stdarg.h> void Function1(unsigned int num, ...); void Function2(unsigned int num, va_list ap); int main(int argc, char *argv[]) { Function1(3, 1, 2, 3); return 0; …

Software Development c++
Member Avatar for daviddoria
0
234
Member Avatar for Denver Cupido

1.Password authentication Write a C++ program that has asks the user to enter a string-input. If the string matches the password stored in the program, then print a suitable welcome message, otherwise allow the user to re-enter the correct password. The user has at most 3 chances to enter the …

Software Development c++
Member Avatar for Excizted
0
160
Member Avatar for adino2

[CODE] private void button1_Click(object sender, EventArgs e) { aTimer = new System.Timers.Timer(3000); aTimer.Elapsed += new ElapsedEventHandler(button2_Click); aTimer.Enabled = true; for (int i = 0; i < 16; i++) { mciSendString("open new Type waveaudio Alias record_sound", "", 0, 0); mciSendString("record record_sound", "", 0, 0); } } private void button2_Click(object sender, EventArgs …

Software Development
Member Avatar for adino2
0
118
Member Avatar for octopusgrabbus

I've read other posts in this form, but still do not know why I get this error: [CODE] File "/home/amr/bin/mysql_lib.py", line 196, in createNewCsRowSQL db_date + ");" TypeError: cannot concatenate 'str' and 'long' objects [/CODE] from this code [CODE] sql_cmd = \ "INSERT INTO customer_synch " + \ "VALUES ( …

Software Development python
Member Avatar for octopusgrabbus
0
340
Member Avatar for corales
Member Avatar for student02
0
87
Member Avatar for Cristofor

Hi, I am using Visual Studio 2008 Express Edition, and I wrote my code as follow: ====================================code starts [CODE]#include <iostream> #include <string> #include <sstream> using namespace std; int main() { string *p; int n; cout << "Please input the number of students"<<endl; cin>>n; p = new string [n]; cout <<"Please …

Software Development c++ visual-studio
Member Avatar for Cristofor
0
106
Member Avatar for adino2

Well since last month I been working on a project to do a "Speech Recognition System" without the use of any 3rd party help like Speech API. So, this is what I have done in my project. Speech recording, save it to a wave file. Reduce the noise of the …

Software Development api
Member Avatar for adino2
0
136
Member Avatar for brettbed

Hi Everyone, This is my first post on this forum. I am pretty new to programming so any help is greatly valued here. Was hoping someone could steer me in the right direction with this Dice-Poker style program I am trying to write in C#. So far I am able …

Software Development
Member Avatar for brettbed
0
487
Member Avatar for syed aamiruddin

[code] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class SelectLayout extends JFrame implements ItemListener{ public static void main (String[] args) { SelectLayout sl=new SelectLayout(); } JMenuBar menuBar; JMenu lmenu,cmenu; JRadioButtonMenuItem lrbmenuItem,crbmenuItem; JPanel menuPanel,bPanel; JButton button; public SelectLayout() { super("Select Layout in swing"); menuPanel=new JPanel(); menuBar=new JMenuBar(); lmenu=new JMenu("layout"); ButtonGroup gp=new …

Software Development first-post java java-swing
Member Avatar for stultuske
0
296
Member Avatar for sciwizeh

Hello All, While doing an assignment, I caused a simple program to slow to a crawl by replacing the calls to Toolkit.createImage() to ImageIO.read() and making all the Image references BufferedImage references. Those where the only changes I made to the program, and it went from running quickly to barely …

Software Development java
Member Avatar for kvprajapati
0
357
Member Avatar for webdragon89

I have: [CODE]void hughint::operator *=(hughint y) { int i,t1,t2,prod,remainder; int carry=0; for(i=num.length()-1;i>=0;i--) { t1=(int)get(i)-(int)('0'); cout<<"t1: "<<t1<<endl; t2=(int)y.get(i)-(int)('0'); cout<<"t2: "<<t2<<endl; if(carry>0) { prod=(t1*t2)+carry; remainder%=10; carry=remainder/10; } } }[/CODE] I'm using 123*100 and the answer I keep getting is 123. Help please.

Software Development c++
Member Avatar for mattjbond
0
111
Member Avatar for PinoyDev

Hi guys. Good day.! I just want to ask on how to retrieve a query result when i filter a field on one table that has a value base on relationship of other table. example: table1(genderid(autonumber),gender(text) table2(membername(text),gender(text) The value of table2 gender is based on table 1 via relationship created …

Software Development visual-basic
Member Avatar for PinoyDev
0
84
Member Avatar for pratima

i must write a program that will convert lower case letters to upper case and vice versa and if a number is entered it must display char is not a letter here is what ave written but when i run it it does not do the conversion.thanks //to convert lower …

Software Development c++ display
Member Avatar for Nick Evan
0
2K
Member Avatar for heValbo

Hi! I’m going to explain to you in details of what I want to achieve. I have 2 programs about dictionaries. The code for program 1 is here: [CODE]import re words = {'i':'jeg','am':'er','happy':'glad'} text = "I am happy.".split() translation = [] for word in text: word_mod = re.sub('[^a-z0-9]', '', word.lower()) …

Software Development python
Member Avatar for heValbo
0
103
Member Avatar for job2617

can anyone help me to create a mouseover effect on an image or a command buttons. your response is highly appreciated . thank you for your help.

Software Development image visual-basic
Member Avatar for kinwang2009
0
118
Member Avatar for daniwebrandom

C++ program creating array the uses the dot product? normalized dot product // Matches the Signal with the Pattern Signal using the "dot product" // of Signal and Pattern divided by the square root of the energy of each. // According to the Cauchy-Schwartz inequality, the result will be // …

Software Development c c# c++
Member Avatar for jonsca
0
192
Member Avatar for phoenix911

i need some help on where to start... i have to get an xml file and n xsl file(already created) merge the to... so that the stye sheet is applied.... sofar all i can do is, is select the 2 files... where to go after that im not sure... any …

Software Development xml
Member Avatar for phoenix911
0
109
Member Avatar for Learning78

Hi; I have a number of text strings in an access db file. I want to compare those text strings with the user input. I need to make sure that atleast 60% of the text input matches with the correct string to declare it a correct answer. e.g. for a …

Software Development c++
Member Avatar for WaltP
0
272
Member Avatar for axed

Hi, I want to know when and where is memory allocated for static variables. If: 1) static variable is in a function 2) static variable is a member of a class 3) a global static variable inside a file of code. Much appreciated. Google hasn't been much of a friend …

Software Development c++
Member Avatar for axed
0
160
Member Avatar for cjsowm

[code] package assignment; import java.io.*; public class AddJava{ public static void main() { int num1,num2,sum; BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); try { System.out.println("enter first digit"); num1=Integer.parseInt(stdin.readLine()); System.out.println("enter second digit"); num2=Integer.parseInt(stdin.readLine()); sum=num1+num2; System.out.println(sum); } catch(IOException e) { System.out.println("input error"+e); } } } [/code] [code] package assignment; import javax.tools.*; import java.io.*; import java.lang.reflect.Method; …

Software Development api java multithreading
Member Avatar for BestJewSinceJC
0
193
Member Avatar for baki100

Okay i have created a wxPython application and converted it into an windows executable programme using py2exe. The app works perfectly but every time i run the exe the console window appears with the gui. Is there anyway to get rid of the console because the app has to run …

Software Development gui python
Member Avatar for baki100
0
984
Member Avatar for theABCasian

i think im missing something could use a pointer heres the problem A palindrome is a string that reads the same backward as forward. For example, the words mom, dad, madam and radar are all palindromes. Write a class Pstring that is derived from the STL string class. The Pstring …

Software Development c++
Member Avatar for theABCasian
0
2K
Member Avatar for drewpee

I don't know what's causing this, but every time I have a do..while loop and the statements inside is quite long, I get an error "Loop without Do". Here is an example of my code.. PS: I know this code segment isn't efficient but this is how i code, do …

Software Development visual-basic
Member Avatar for drewpee
0
185
Member Avatar for rkulp

My professor gave use the code to a function that draws a line in the grid. I have made my class function but I am not sure how to use it with this function he gave us. [CODE]void drawLineInGrid(char grid[][MAX_Y], const Line &line) { int xDifference, yDifference, xIncrement, yIncrement, error; …

Software Development c++
Member Avatar for Ancient Dragon
0
176
Member Avatar for johndoe444

I am sick of segmentation faults. This is the last straw. How to tame this ferocious wild beast? For small programs it can be debugged. But when dealing with large programs such as implementing a b-tree with thousands of pointers it is a nightmare to pinpoint the location of segmentation …

Software Development c
Member Avatar for thomas_naveen
0
127
Member Avatar for zinnqu

I have created a encryptor/decryptor that allows you to encrypt/decrypt text in a textbox, or a file. The basis of the system is to allow a user to thoroughly protect data within their system. Is there anyone that would be willing to test the program?

Software Development encryption vb.net
Member Avatar for zinnqu
0
170
Member Avatar for mattj63

I'm trying to create a csv file from a list of dictionary items where each dictionary in the list has the same keys. I want the csv file to have the keys in the first column and the remaining columns will have the values for each dictionary in the list …

Software Development python
Member Avatar for mattj63
0
1K
Member Avatar for khaled.s

[CODE]#include <iostream> using namespace std; int main(){ for (int i = 0; i < 1000; i++) { int die1, die2, roll1, roll2, point,; die1 = 1 + rand() % 6; die2 = 1 + rand() % 6; point = die1 + die2; cout << "You rolled: " << point << …

Software Development c++
Member Avatar for WaltP
0
215
Member Avatar for prakashjoshi010

Hi, I would like to declare function with calling convention. But getting following errors on CentOS 4.7 with GCC 3.4.6 test.c:3: error: syntax error before "display" test.c:3: warning: data definition has no type or storage class test.c:12: error: conflicting types for 'display' test.c:3: error: previous declaration of 'display' was here …

Software Development c storage
Member Avatar for Dave Sinkula
0
133
Member Avatar for happydiamond

I need to run large PDF files of financial reports, saving each Acct. ID to a separate PDF file so I can post electronically (to avoid printing out 800 pages a month and distributing in paper format). I don't know VB but the attachment shows the steps I need to …

Software Development pdf visual-basic
Member Avatar for vb5prgrmr
0
123
Member Avatar for ala0003

I have been learning c++ and Allegro (graphics libary) for about a year, and have been trying to get this code to work (in particular, passing the array of classes), and when compiling i get the following errors C:\Documents and Settings\User\Desktop\npc.h In member function `void cNPC::NPCmove(cNPC*)': 96 C:\Documents and Settings\npc.h …

Software Development c c++
Member Avatar for ala0003
0
228
Member Avatar for tarheelfan_08

Can someone please help me get my code running! I am trying to do a sectional sort based on mileage. I have got a lot of code wrote based on the book, but I can not get it to work or figure it out! Please assist! Class [code] #include <iostream> …

Software Development algorithm c++
Member Avatar for tarheelfan_08
0
114
Member Avatar for atticusr5

Hey Everyone, I am trying to compile and run a program for my C++ class, and I am getting a Segmentation Fault as a runtime error. I looked at my code and my datafile to make sure that there was not an issue but I can not seem to find …

Software Development c++ ios open-source ubuntu
Member Avatar for atticusr5
0
180
Member Avatar for mikecole79

I'm looking for a little help with modem communications. I'm trying to get a .wav file to play through a modem. What I've got is a program that has a couple buttons on it. You enter a phone number or numbers into the text box at the top, click the …

Software Development audio smartphone
Member Avatar for kvprajapati
0
267
Member Avatar for richman0829

I seem to be inventing my own syntax here. The idea seemed simple enough: use the keyword 'new' to allocate space for a new integer array, and populate it with a few integers. Where have I gone wrong? [CODE] #include <iostream> using namespace std; const int SIZE = 5; int …

Software Development c++
Member Avatar for richman0829
0
189
Member Avatar for AnnetteM

Hello, I would like to reshape and then transpose data that I import from a file. I downloaded the 'numarray' to access the shape and transpose functions since I am using python version 2.5. This is the pdf I'm using: [url]http://stsdas.stsci.edu/numarray/numarray-1.5.pdf[/url] The data is one long column (length=455), I will …

Software Development os-x pdf python
Member Avatar for AnnetteM
0
607
Member Avatar for richman0829

If I uncomment the 'int x;' above main, and comment out the int x = 0 inside of main, it works, but I don't want to use global variables. What I can't understand is why x is out of scope. The text I'm using says “vars having local or block …

Software Development c++
Member Avatar for richman0829
0
125
Member Avatar for muffinhead

I know *what* the problem is, I'm just not sure how to proceed... Here's the code I have so far: [CODE]void BinarySearchTree::writeIteratively(ostream& outfile) const { TemplateStack<Node*> stack; // this is to set up the actual stack Node* current = root; while (current != 0 || !stack.isEmpty()) { // here is …

Software Development c++ storage
Member Avatar for muffinhead
0
152
Member Avatar for clutchkiller

I was just in class, learning about STL and class templates. My teacher said you cannot split the class declaration and the function definitions into the normal header/cpp file like you can with non template classes. Is this true, and if so why? I assume it would have somthing to …

Software Development c++
Member Avatar for StuXYZ
0
121
Member Avatar for dczet

I tried using a lib (svgacc) in Borland C++ both from source directory(i.e. bin) and lib and include directories(ofcourse after previously copying the in those dirs D:). The error is : Linker error: undefined symbol _videomodeget in module main.cpp . I tried building in a project of modules as well …

Software Development c++
Member Avatar for hsagar22
0
378
Member Avatar for skateatvu

Hi there i one of my programing buddies said it would be good practice to make a macro program.So i was wondering how would i go about that.Im a vb6 noob. The program needs to be able to do the following. Record Macro Sessions,and be able to pause the play …

Software Development visual-basic
Member Avatar for wewill23
0
107
Member Avatar for tquiva

Hi could someone please help me with this problem. I want to find the greatest and least numbers of all current input numbers. My output is wrong. I can't seem to calculate the max/min of all the current input numbers. My code only find the max/min between two inputs. Here …

Software Development c
Member Avatar for tquiva
0
229
Member Avatar for Stefano Mtangoo

Hi All, I want to parse simple XML file and I was looking if there is C++ standard library classes for doing that. IF no what are good yet simple XML C++ third party libraries? Thanks

Software Development c++ xml
Member Avatar for Stefano Mtangoo
0
403
Member Avatar for sunlitdays

I am trying to write a code that calculates the end time of an event (in military time) based on 6 values the user enters: the starting hours, minutes, and seconds, and the duration hours, minutes and seconds. The user can't enter values greater than 24, 60, and 60 for …

Software Development c++
Member Avatar for WaltP
0
167
Member Avatar for Bemani_lover

Ok, so I'm having a bit of trouble with understanding how swing interfaces work. Here's the problem. Write a Swing program that declares an empty array of grades with a maxium of 10. Implement a JOptionPane input box within a while loop to allow the user to enter grades using …

Member Avatar for kvass
0
173
Member Avatar for KRal

/* When I run this code the random numbers that are supposed to be generated will not cout. Any suggestions would be a great help!*/ [CODE]int main() { Fraction operand1, operand2, resultant; int a, b, c, n, d; char op, choice; //char opchar: srand(time(0)); system("cls"); //a.setAll(1); //1 indicates that it's …

Software Development c++
Member Avatar for WaltP
0
153
Member Avatar for london-G

hello I would like to create a subroutine, so that I don't have to repeat the code. I have different labels on a form in which when the user clicks on them it hides the second form and show the third form for now I have this code for every …

Software Development vb.net
Member Avatar for TomW
0
92

The End.