132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for pato wlmc

Well, I know that for this I need a graphic library but which one do you recommend? I'm working on Windows, with VISUAL C++, and I know I can use windows libraries, or something, but there are a few problems with that (Mainly that I don't wanna use them). Also, …

Software Development c++ data-structure
Member Avatar for myk45
0
3K
Member Avatar for miturian

Job: my class "network" contains a vector "taus". I wish "network" to be able to find the indexes of the n smallest elements. My first idea was along the lines (this is mostly meant as pseudo-code): [CODE] #include<algorithm> #include<vector> #include<cstdlib> class network { vector <double> taus; vector <int> nsmallest; vector …

Software Development algorithm c++
Member Avatar for StuXYZ
0
2K
Member Avatar for jainpratik2

Hi Folks, I have stuck in problem. I want to record keyboard events like key up and key down in Linux OS but I couldnt able to find any proper answer. I have got function but thats lib is very specific to Dev C++ in windows.[CODE]void GenerateKey(int vk , BOOL …

Software Development c++
Member Avatar for jainpratik2
0
770
Member Avatar for furret

So I have a function called find_positions which gives off values like [101,207] [99, 87] [34, 56] etc. I then have a centre of mass function called CoM which when any region is put in, can find the centre of mass of that region. Herein lies the problem. I need …

Software Development python
Member Avatar for woooee
0
134
Member Avatar for ccandillo

Can someone please tell me why my menubar does not show up? [CODE] #!/usr/bin/env python from Tkinter import * class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.master.rowconfigure(0, weight=1) self.master.columnconfigure(0, weight=1) self.master.title('Test Menu') self.createMenu(master) #self.createShell() def createMenu(self, master): menubar = Menu(master) master.config(menu=menubar) loadmenu = Menu(menubar) loadmenu.add_command(label='Load', command=self.load) loadmenu.add_command(label='Save', command=self.save) loadmenu.add_separator() loadmenu.add_command(label='Quit', …

Software Development python tkinter
Member Avatar for woooee
0
353
Member Avatar for dflor

I need to find the smallest number formed from the same digits of a given natural number n, using arrays.

Software Development c++
Member Avatar for WaltP
0
334
Member Avatar for mocha8688

I have a text file to be read "Mary had a little lamb its fleece was white as snow and everywhere that Mary went, the lamb was sure to go!". The program should do the following: 1. count number of words in file 2. print all words, one per line …

Software Development c++ file-system
Member Avatar for WaltP
0
145
Member Avatar for yuri1969

Hi, I have prolly very noobish question. I compile my program separately with GCC by: [CODE]gcc -O2 -Wall -c foo.c[/CODE] I just wat to ask if there is a chance to specify the output destination of [B]foo.o[/B] file. Now the output is forwarded to the makefile dir. Thank you for …

Software Development c c++
Member Avatar for yuri1969
0
2K
Member Avatar for motherboardlove

Say I have this code: [CODE]BOOL WINAPI ActivateActCtx( HANDLE hActCtx, ULONG_PTR *lpCookie ); DWORD WINAPI EnumerateLocalComputerNamesA( COMPUTER_NAME_TYPE NameType, ULONG ulFlags, LPSTR lpDnsFQHostname, LPDWORD nSize ); [/CODE] And I need a C++ script to automatically turn thousands of those into something like this: [CODE]BOOL WINAPI ActivateActCtx( HANDLE hActCtx, ULONG_PTR *lpCookie ) …

Software Development c++
Member Avatar for motherboardlove
0
216
Member Avatar for shindu

I am tryint to convert my c++ coed that solves a HiQ puzzle with a depth first search into c# so that i can play around with a gui for it. I have tried a few different approaches but the whole idea of everything being inside of a class is …

Software Development c# gui puzzle
Member Avatar for shindu
0
175
Member Avatar for kpxny2sk

Hi. I was wondering if theres a way to take a specific item from a list to another list. Here's what I thought would work...: [CODE]def __init__(self, indata): self.data = indata self.total = len(self.data) def getTtestFactorA(self, factorA): ListFactorA = [] for factorA in self.data: ListFactorA.append() return ListFactorA def getTtestFactorB(self, factorB): …

Software Development python
Member Avatar for richieking
0
196
Member Avatar for StanRogo

Now I have been doing pascal for three months. I am now trying to create a simple calculator program. However, the TEdit box is not working. I type in the value but it seems it is not recording since when converted to either a float or int it states that …

Software Development pascal
Member Avatar for StanRogo
0
206
Member Avatar for manish250

dear all i am new to perl. when i run my basic perl program as follows[CODE]print<<EOF; HELLO MY NAME IS MANISH ARORA EOF[/CODE] i am getting this error Can't find string terminator "EOF" anywhere before EOF at PERL.plx line 1. please help

Software Development perl
Member Avatar for manish250
0
176
Member Avatar for moroccanplaya

when the user types in ls i want the program to show the listed files in his directory but it is not working i cant list the files can anyone help ? this is what i have done so far. it breaks fine when the user enters x [CODE] while(1) …

Software Development c
Member Avatar for Shankye
0
150
Member Avatar for MrJNV

I need help figuring out if two numbers are co-prime. So far I have this (prime() is a bool function) [CODE]void GetE(int& e, int& result) { int random = rand(); do{ while(prime(random)) { if(random < result) e = random; else random = rand(); } while(!prime(random)) { random = rand(); } …

Software Development algorithm c++
Member Avatar for arkoenig
0
606
Member Avatar for mocha8688

I have to write a slot machine program where theres 3 wheels. wheel 1 = cherry, cherry, cherry, plum, plum, bell, bar wheel 2 = cherry, cherry, plum, plum plum, bell, bar wheel 3 = plum, plum, bell, bar, cherry cherry. when wheels "spin", output should show three items from …

Software Development c++
Member Avatar for mocha8688
0
2K
Member Avatar for Leodumbi

Hi Guys please I need your help. I'm creating this small application that will control some equipments based on its bar code and the owner picture. everything is working fine, except the picture. is there a way to save image to access database using ADO Connections and\or recordsets? I've head …

Software Development app-store vb.net
Member Avatar for Leodumbi
0
167
Member Avatar for Blackberryy

This code should draw the concentric circle in a patch design and alternate its colours between, Red, Blue, Green(or whatever the user enters from the validColours list) but it wont work. Somebody fix this please. [CODE]from graphics import * def main(): x = 0 y = 0 while not(3<=x<=9): x …

Software Development python
Member Avatar for Blackberryy
0
122
Member Avatar for michaelsd

I need to write an application which globally intercepts Alt+Shift+S. What I did is I created a DLL which sets global hooks: [CODE]namespace Hotkeydll { public class MyHotKey { public static void setHooks() { KeyboardHookProcedure = new HookProc(KeyboardHookProc); hKeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProcedure, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0); } private int KeyboardHookProc(int nCode, Int32 …

Software Development assembly c#
Member Avatar for Diamonddrake
0
893
Member Avatar for harryhaaren

Hey guys, I written a base class (AudioTrackElement), and derived a class from there (Looper) and another (VolumePan). The looper class implements functionality, while the AudioTrackElement is there just so I can hold many Loopers and VolumePan objects in the same vector. The problem: I can create a [icode]std::vector<AudioTrackElement>[/icode] no …

Software Development c++
Member Avatar for harryhaaren
0
230
Member Avatar for cielle

Hi guys, jfugue is a jar file for music programming. I had run some example from jfugue.. it plays the song. But may i know does jfugue has the method to display the musical notation? N what should i do if i wish to display musical notation as output in …

Software Development ide java
Member Avatar for cielle
0
276
Member Avatar for Atilly11

My assignment asks me to Implement a Linked List class with FoodItem as the objects to be inserted in the class, and implement a PrintList function member that prints the name of each food item in the list. Implement a SelectPrint function member that only prints the food item names …

Software Development apple c++ linked-list
Member Avatar for daviddoria
0
121
Member Avatar for centerline00

[B]Program goal[/B]: user input for 2 equations to evaluate the operator signs. i.e. 1 * 2 + 4 - 4 and 5 - 2 * 6 + 9 would be the same --> " * + - " in both, order does not matter. [B]Output[/B]: cout saying match or not …

Software Development c c# c++
Member Avatar for daviddoria
0
222
Member Avatar for Storchillarn

Hello! I'm trying to alter a raytracer program which is supposed to create a picture of 25 spheres. It's an exercise in optimization so I'm basically trying to make the program run without any unnecessary code, making the program specific for the intended output. I'm using a C++ array to …

Software Development c++
Member Avatar for daviddoria
0
125
Member Avatar for fettucine1

Our professor ask us to upload our program in a website, I've been searching through the web with possible ways, but I still can't figure it out how to do it. Do we have to use the .cpp file? There's another problem, I a trying to run the "Application file" …

Software Development c++
Member Avatar for Ancient Dragon
0
229
Member Avatar for NewOrder

[CODE]object[] a1 = new string[3]; // Legal object[] a2 = new int[3]; // Error[/CODE] why is that? why int cant implicitly be converted to an object? isnt int type of object?

Software Development legal
Member Avatar for NewOrder
0
72
Member Avatar for Xeex

Hi, I got a server with several of IP's at. Those IP's I want to create sockets through and afterwards from a client, and afterwards send a socket to a webpage. The problem is that I want to use the IP that the client is calling to create the socket …

Member Avatar for richieking
0
200
Member Avatar for Gamer0077

First of all, sorry for my bad english, that doesn't make any sence at all. So, please correct me. I made a programm to use SendKeys, but I want a delay between the word. I was able to split the string in words, but I wasn't be able to send …

Software Development
Member Avatar for Gamer0077
0
1K
Member Avatar for Elandir

Hi! I need to write a program that moves some letters to the end of a word for example if i enter : cook look book telephone, the result would be: ookc ookl ookb elephonet. i came up with some code but then my ideas run aout...some help would be …

Software Development c++
Member Avatar for SgtMe
0
187
Member Avatar for shinsengumi

Hello all. I'm trying to compile a socket program in DevC++ but everytime I do it I get a lot of linker errors like these: [CODE] [Linker error] undefined reference to `WSAStartup@8' [Linker error] undefined reference to `htons@4' [Linker error] undefined reference to `inet_pton' [Linker error] undefined reference to `socket@12' …

Software Development c c++ socket-programming windows-xp
Member Avatar for shinsengumi
0
899
Member Avatar for cjoyce

hi guys... i can connect now to the mysql database and is able to display the database names (because i have 3 databases) in a combo box.. i was stuck up in displaying tables from mysql in a listview.. please help me solve this.. here are my codes: [code] Public …

Software Development dataset display listview mysql vb.net
0
399
Member Avatar for Ron2794

I am making a program on library management but in my program I am getting the error when I am extracting the date from MySQl(my database). Below is the short piece of code where I am getting the error. [CODE] Calendar c1=Calendar.getInstance(); ResultSet rs=stm.executeQuery("Select AccessionNumber,Name,Fine,DueDate from issuer natural join classinfo;"); …

Software Development java sql
Member Avatar for Ron2794
0
631
Member Avatar for el3ashe2

hello my first thread to as for something here but i like daniweb a lot i'm trying to save data from listview to sql server [CODE] Dim iCount As Integer Dim iLoop As Integer Dim query3 As New SqlCommand Dim lvitem query3.Connection = New SqlConnection("Password=sasa;Persist Security Info=True;User ID=sa;Initial Catalog=Tel;Data Source=HA-PC") …

Software Development listview open-source sql vb.net
Member Avatar for el3ashe2
0
2K
Member Avatar for ticktock

Hey all I am currently a java beginner and I would like to ask how would I return control to my main if ever I encounter an exception created by me? For example: [CODE]public void checkIn(int roomNumber, String occupantName, int day) throws ExceptionHandler { int checkValue = this.employingHotel.checkIn(roomNumber, occupantName, day); …

Software Development java
Member Avatar for ticktock
0
203
Member Avatar for Khodz

I've been writing a piece of code that will use a brute force approach to find 50 exponential equations that fit 5 points (x,y) that i've entered. The code is fine and works without a glitch.. The problem is when i try to make it keep a record of the …

Software Development java
0
110
Member Avatar for hughser

Please could i have some code for my c# 2010/ .NET 4 web browser. I always recieve an out of range exception for my progress bar- could i have some working code for a web browser to make a progress bar to work properly!

Software Development web-browser
Member Avatar for Mitja Bonca
0
199
Member Avatar for myk45

Hello, im trying to implement a generic double linked list, and i have added just one function(insert). But im getting some errors. Here is the code: [CODE]#include <iostream> #include <cstdio> #include <string> using namespace std; template <typename T> class doubleList { private: struct Node { T info; Node *leftPtr; Node …

Software Development c++ linked-list
Member Avatar for griswolf
0
160
Member Avatar for kuchick32

How do I write a a recursive function that counts the number of sequences that sum up to that number (user input)?

Software Development c++
Member Avatar for frogboy77
0
132
Member Avatar for fettucine1

I have a problem printing the winners in my Voting Program. Please help me finish it. [CODE]#include <iostream> using namespace std; void DisplayOptions(); //void DisplayOptionsVice(); int InputVote(); int UpdatePoll(); void DisplayPoll(); //void DisplayPollVice(); int VoteArray[5]; //----------------------------- void main() { int option; int loop; int ctr=0; for(loop=0; loop<6; ++loop) { VoteArray[loop]=0; …

Software Development c++
Member Avatar for fettucine1
0
1K
Member Avatar for frankchester

I've found how to convert a char to its ascii value (toascii) but I want to do it the other way round! I'm aware you can use putchar() but that doesn't really work so well for what I'm doing, or at least I'd like to find a quicker way if …

Software Development c
Member Avatar for bambrah jai
0
160
Member Avatar for mcmc1212

My text file is delimited (2 fields (text & numeric)). I'm trying to get the output into columnar format and include a count of the # of records following the columnar format. My text file is separated by commas. So far I can only read the text file. Here is …

Software Development
Member Avatar for Mitja Bonca
0
169
Member Avatar for udigold1

Hi, I have a form with tab control in it and in on of the tabs I got a datagrid. On runtime, whenever I try to display data on the datagrid from a database, the datagrid "jumps" from the tab to the form itself so the tab hides most of …

Software Development
Member Avatar for Mitja Bonca
0
1K
Member Avatar for smrati.katiyar

i am not sure why the value of b is coming out as 0 according to me it should come out as 3 [CODE]#include <iostream> using namespace std; void read(int a[],int n) { for (int k = 0;k < n;k++) { cout << "enter the " << k << "th …

Software Development c++
Member Avatar for VernonDozier
0
86
Member Avatar for rena0514

For class I have to use a stack to find if a word entered by the user is a palindrome... [CODE]#include <iostream> #include <string> #include <stack> using namespace std; int main() { char *word; int count; stack <char> mystack; stack <char> rev_stack; cout<<"Enter a string "; cin>>word; while(*word!=NULL) { mystack.push(*word); …

Software Development c++
Member Avatar for thelamb
0
253
Member Avatar for Vindal

I have made... well attempted at making a unique random number generator using arrays and functions, but it still will not work and I cannot find my error at all. Can someone please help? T_T [CODE]#include <iostream> #include <ctime> using namespace std; // *****Function prototypes**** void displayArray(int randNum[], int elements); …

Software Development c++
Member Avatar for Vindal
0
6K
Member Avatar for Vindal

My problem is to make a program that stores a High temperature and a Low temperature within a two dimensional array and then displays the Average. I can get the numbers to be stored(I think, but the average doesn't work at all it seems to display the last number entered …

Software Development c++
Member Avatar for Vindal
0
2K
Member Avatar for tofugamer

Hi, I'm having to write Conway's game of life for school and I'm having a little trouble with it. Whenever it runs through the code, all of the 'cells' move to the left a bunch and warp around the screen.. I'm not sure why.. Any help would be great! Thanks! …

Software Development c c# c++
Member Avatar for tofugamer
0
245
Member Avatar for darkace69

I need to create a ResistorClass overloaded logical OR operator function which shall do the following: Overload the logical OR operator ( || ) to calculate the equivalent parallel resistance of the nominal values ( m_dptrRes[0]) of two Resistor Class objects. The formula for calculating parallel resistance is: NominalValue1 * …

Software Development c++
Member Avatar for darkace69
0
227
Member Avatar for sunny124

Hi, The program compiles and executes with no errors but its not saving the category that the users enters as one of the constants listed in the enum 'ItemCategory'. So if the users types 1, it should save category as 'Women', if users types 5, the program should save category …

Software Development
Member Avatar for kvprajapati
0
131
Member Avatar for rutherfordln

Hi I need help!! My program is supposed to count word occurences from a text file and the output is supposed to look like this a 2 count 1 hello 1 test 2 this 1 words 1 but instead it does this : a 2 a 2 count 1 hello …

Software Development c++ file-stream
Member Avatar for Clinton Portis
0
1K

The End.