132,726 Archived Topics
Remove Filter ![]() | |
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 | |
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 … | |
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++ | |
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 | |
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', … | |
I need to find the smallest number formed from the same digits of a given natural number n, using arrays. Software Development c++ | |
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 | |
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 … | |
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++ | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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(); } … | |
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++ | |
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 … | |
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 | |
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 … | |
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++ | |
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 … | |
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 | |
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++ | |
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++ | |
[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 | |
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 … Software Development client-server lan-wan python socket-programming | |
![]() | 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 ![]() |
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++ | |
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 | |
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 … | |
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;"); … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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++ | |
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++ | |
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++ | |
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++ | |
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! … | |
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++ | |
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 | |
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 |
The End.