43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for jesseb07

hey, I got a question regarding functions returning a linked list. Here's the data structure of my linked list (just in case it deviates from the standard way of doing it) [CODE] template <class T> class Link { private: unsigned int size; Link<T> *nextRow; Cell<T> *firstCell; public: Link(); ~Link(); //functions …

Software Development c++ data-structure linked-list
Member Avatar for jesseb07
0
105
Member Avatar for paolomontero

Provided the following template: [code=cplusplus] template <class T> class MyTemplate { private: T myData; public: MyTemplate(const T &data) : myData(data) {} bool Contains(const T &); }; [/code] Is there a way to ensure at compile time that the argument T derives from another class? I want T to derive from …

Software Development c++ linked-list
Member Avatar for paolomontero
0
191
Member Avatar for Gman36

Hi All, As you've probably read a million times, I am a newbie to java programming and need some help with uni assignment. I need to know how to numerical update a Textarea by clicking on a button. This would be a lot simplier if I could do it one …

Software Development java java-swing
Member Avatar for VernonDozier
1
192
Member Avatar for wedunnit

I am an infant attempting to learn to crawl through Java. I have been learning for just over four weeks now, and have been doing relatively well. However, I am now on arrays, and find myself not only floundering, but drowning! My text seems extremely difficult to understand, and I …

Software Development java
Member Avatar for BestJewSinceJC
0
103
Member Avatar for ald4057

I'm a first semester CINT student and I'd like to add some "bling" to my final project. I want to add blinking text to my final forms clearform button. My code so far: [code]Private Sub orderForm_Load(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles MyBase.Load 'disabling the animation on …

Software Development vb.net
Member Avatar for ald4057
0
111
Member Avatar for nonang

How do I have the algorithm below to sort my list in opposite direction (right to left) instead of left to right. Also, how do I make it sort simultaneously or alternatively in both directions? Thanks. [code=python] def bubblesort(l): for passes in range(len(l)-1, 0, -1): for index in range(passes): if …

Software Development algorithm python
Member Avatar for vegaseat
0
163
Member Avatar for tintincute

hi I'm doing an exercise from a book, where I created a project called "Example.cs". When I wrote the code, here are the steps involve: 1. Select New Item. This causes the Add New Item dialog to be displayed. Select Code File and then change the name to Example.cs, 2.Next, …

Software Development file-system ide
Member Avatar for Ramy Mahrous
0
116
Member Avatar for Atomika3000

I am getting further with my Property to let program, but i need help working out the above error, it happens when the user selects the option to delete a property from the text file. The user is supposed to be able to enter in a number and that deletes …

Software Development java
Member Avatar for Atomika3000
0
118
Member Avatar for happymadman

Is there anyway to compare lists or check to see how many of the objects in one list are the same as the other list? eg: L1 = [dog, cat, john, moo] L2 = [dog, cow, moo, stuff] there is two of the same "things" in it I'm trying to …

Software Development python
Member Avatar for happymadman
0
147
Member Avatar for AutoC

Hi, Here's my code [code] #include<iostream> #include<fstream> #include<string.h> #include<math.h> #include<stdlib.h> #include<stdio.h> using namespace std; int cIndex(char *x,char **featlist,int len) { int i; for(i=0;i<len;i++) if(strcmp(x,featlist[i])==0) return i; } int main(int argc,char *argv[]) { std::ifstream featFile(argv[1],ios::in); std::ifstream trainFile(argv[2],ios::in); // std::ofstream svmFile(argv[3],ios::out); char line[20000]; char feat[100]; char **featlist; int i=0,len=0,fl=0,j; char* x; int …

Software Development c++ ios
Member Avatar for AutoC
0
146
Member Avatar for arshad115

hi,i m making a windows forms application and i want to make a treeview which displays input of textbox Under the Parent Node . i have tried searching over the internet,but nothing seems to be working. i have added the parent nodes from the properties tab,but how do i change …

Software Development apple c++
Member Avatar for arshad115
0
198
Member Avatar for VIPER5646

[QUOTE]Hi I have an INSERT INTO SQL that keeps on retuning an Syntax error in Insert Into. I cant seam to see where the error is, can anyone Help. This is my SQL.[/QUOTE] [ICODE]Dim DesignSQL As String = "INSERT INTO Design_tbl (CustmrID,[User],Builder,Model,Type) values ('" & _ CustID & "', '" …

Software Development vb.net
Member Avatar for VIPER5646
0
121
Member Avatar for TheFueley

Plink is a command-line version of PuTTY, a Windows SSH client program. I am trying to get the output from plink to display in a textbox within a VB form. I can get it to work but I must hit the ENTER key twice before it shows anything, everytime. So …

Software Development vb.net
Member Avatar for TheFueley
0
199
Member Avatar for moiron

how do I get the maximum, minimum and the average of an array? this may be different but how do I get to stop inputting number in an array. for example if the array is 20 and i only need 10 of them. i think its something about EOF but …

Software Development c
Member Avatar for moiron
0
251
Member Avatar for kvprajapati

Hi, Following code snippet show the maximum number of nodes to be created. I execute this code and show the count : 7874 My problem is that I want to create more node than 7874. I have compiled this code by Turboc version 3.0 on Windows XP. [CODE]#include <stdio.h> #include …

Software Development c++
Member Avatar for John A
0
167
Member Avatar for besktrap

hi everyone! I have two files, main.py and sprite_class.py. sprite_class.py is in a separate folder called lib. here's a quick diagram: ------------------------------------ /folder engine/ main.py /folder lib/ sprite_class.py ------------------------------------ ...sprite_class.py contains a class called Sprite: [CODE] # sprite class class Sprite(): def __init__( self, start_x, start_y, image_path ): self.x = …

Software Development python
Member Avatar for besktrap
0
10K
Member Avatar for mentor07825

Hey everybody, I need a bit of help please. I need to create an 8086 application that will draw a line between two points on the screen that you click on. It's using Bresenham's line algorithm to do the calculations between the two points. I'm using Tasm and Tlink to …

Software Development algorithm assembly
0
93
Member Avatar for Clockowl

Hey guys, How would I partially specilize a template in a manner as below? Is that even possible? I have these two functions: [code=cpp] bool node::read(const char *filename) { ifstream f(filename); if (!f.good()) return false; bool success = read(f); f.close(); return success; } bool node::write(const char *filename) { ofstream f(filename); …

Software Development c++
Member Avatar for Clockowl
0
511
Member Avatar for Xamas

Well, I don't want to do lot of copy-paste in my code, so, I'm just wondering - is it possible to have two different names of one functions(I prefer that function name describe what is used for): ex: [CODE]int do_my_client(int info) { blah blah blah; .... .... return inf; } …

Software Development c++ client-server
Member Avatar for ArkM
0
107
Member Avatar for Peyton

Hi there, I am having a problem with the following code: [CODE]#include <iostream> #include <string> #include <fstream> using namespace std; int findRows( string line ); int main() { string line; int rows = findRows( line ); cout << "Number of rows: " << rows << endl; } int findRows( string …

Software Development c++ file-stream
Member Avatar for Peyton
0
159
Member Avatar for niku4u

Following is my client code....I am receiving data of equal size of JPG file... so if anyone can help me out with reading buffer properly and writing it in to jpg file at client side ================================================ do { memset(buffer,0x0,BUFFER_SIZE); // init line rc = read(sd, buffer, BUFFER_SIZE); if( rc > …

Software Development c socket-programming
Member Avatar for niku4u
0
494
Member Avatar for newbiecoder

Hi, I am expected to use sscanf function in a program, but I couldn't understand how it works. Can you explain it with an easy example? Thanks -- newbiecoder

Software Development c
Member Avatar for newbiecoder
0
151
Member Avatar for orwell84

I'm having a problem with the substr function. I want it to be dynamic in a for loop as follows: [code="perl"] for ($i = substr $bin, $sub, 1 ; $sub < $len2 ; $sub++){ [/code] You can probably guess what this code is meant to do. I want to read …

Software Development perl
Member Avatar for orwell84
0
310
Member Avatar for Valaraukar

Hi, I've written a program that reads object information from an ASCII file (exported from 3dsmax) so that an object/objects can be reproduced in OpenGL. It works fine at the minute and can read multiple objects from a single file but what I want to be able to do is …

Software Development c opengl
Member Avatar for Valaraukar
0
290
Member Avatar for lifted

Hello everyone, first little explanation about what i want my program to do: i use wget to download a webpage but instead of downloading it into a file i want the webpage sourcecode in a variable so that i can parse it and put it in a database later. Now …

Software Development c++
Member Avatar for lifted
0
178
Member Avatar for BoneXXX

Hi, I dont know much about programming, however I have a c++ program(i didnt write it) that I need to use it to do some experiments. When I compile the program I get this errror. [code] dynn.cpp: In function ‘void make_near()’: dynn.cpp:374: error: name lookup of ‘j’ changed for new …

Software Development c++
Member Avatar for BoneXXX
0
354
Member Avatar for Dannyo329

Hi, I have a question with ofstream, is there anyway to ask the user for a file name, then create the file, and write to it? Like: [CODE] string file; cout << "Enter filename:"; getline(cin, file); ofstream ofile; ofile.open(file); ofile << (stuff....); ofile.close; [/CODE] ...except that doesn't work properly.:S Thanks …

Software Development c++
Member Avatar for Dannyo329
0
155
Member Avatar for ashkash

I need to perform a sha-1 hash on a byte array. The byte array needs to be hashed with all combinations of a minimum of 4 bytes to a maximum of all 9 bytes of the following bytes: 00 01 02 03 04 05 06 07 08 So the following …

Software Development
0
75
Member Avatar for Dart82

Hello, Im currently writing code for a program that translates a line of text from English into German then back again. Its a big loop that needs to be executed the same number of times as words in the text. I'm almost there but there doesn't seem to be anything …

Software Development python
Member Avatar for Dart82
0
96
Member Avatar for abrars

the code seems to be fine dont know why its not working. when i execute the same sql directly in database it works fine. the error is get is oledbexception was unhandled syntax error in from clause. please help me thanks is advance. Private Sub Button2_Click(ByVal sender As System.Object, ByVal …

Software Development dataset open-source vb.net
Member Avatar for abrars
0
152
Member Avatar for orcsoul

I've gotten about 90% of this program done, but I can't seem to figure out how to do one last operation in it that is needed. What I'm having a hard time figuring out, is how to make a total for each person in the file? I'm sure it's deceptively …

Software Development c++ ios
Member Avatar for orcsoul
0
122
Member Avatar for BruenorBH

I am new to Win32 API and am having trouble setting up the menu. Here is what I have at the moment (my new way of doing the main.cpp code is from another member) but I cannot understand where to put in the function call for the menu.. main.cpp [code] …

Software Development api c gui windows-api
Member Avatar for nucleon
0
166
Member Avatar for slim2hott

ok so i wanted to make a number randomiser like so: [CODE]#include <iostream> #include <windows.h> using namespace std; int main() { srand((unsigned)time(0)); int random_integer; for(int index=0; index<20; index++){ random_integer = (rand()%60)+1; MessageBox(NULL, "Random Number: ", "Bingo",MB_OK | MB_ICONINFORMATION); Sleep(2000); } return 0; } I want to put the randon_integer result …

Software Development c++
Member Avatar for slim2hott
0
158
Member Avatar for Stefano Mtangoo

I have two files and I would like to call addition function from functions.cpp in main.cpp. But I get error: [COLOR="Red"]In function `int main()': error: `addition' has both `extern' and initializer error: initializer expression list treated as compound expression warning: left-hand operand of comma has no effect error: `addition' cannot …

Software Development c++
Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for gbrokaw

Hey everyone, I'm writing a program with a Tkinter GUI for my job and I was wondering whether there is a way to create an icon on my desktop to start it so I don't have to start Idle and run the program from that (computer un-savvy people will need …

Software Development gui python tkinter
Member Avatar for gbrokaw
0
137
Member Avatar for apollo1492

Im writing this program that draws a bar graph showing an investment growth. and this error keeps coming up and i cant figure it out. this is the syntax that python keeps telling me. Traceback (most recent call last): File "C:\Python26\lala.py", line 68, in <module> main() File "C:\Python26\lala.py", line 47, …

Software Development python
Member Avatar for apollo1492
0
141
Member Avatar for jwatte

I am embedding Python 3.0.1 on Windows, using MSVC 2008 sp1. I do not pass FILE* structs to Python, so I think compiler version differences is not a problem. The following code has a problem, in that the "txt" string that comes out at the end only contains the character …

Software Development python
Member Avatar for jwatte
0
361
Member Avatar for lancevo3

Hey, I'm writing a function that searches for an id in an array of a structure, for some reason it returns -1 everytime, so I was just hoping another set of eyes could help me clarify this. [code=cplusplus] int searchAr(student studentar [], int size, int searchid) { int i; for(i …

Software Development c++
Member Avatar for lancevo3
0
175
Member Avatar for Ani2084

I am new to C++ and am trying to do this [CODE]void rolodex::createCard(){ char* userData = "\0"; cout << "\n\nEnter first Name - "; cin >> userData; currentCard.setFirstName(userData); cout << currentCard.getFirstName(); count++; } [/CODE] when I try to execute it gives me an unhandled exception, access violation error What am …

Software Development c++
Member Avatar for siddhant3s
0
69
Member Avatar for crh0872

I'm new to C++, and I have a function, [inlinecode]char* parse( char* buf, char* find_this )[/inlinecode] which finds an instance of [inlinecode]find_this[/inlinecode] inside of [inlinecode]buf[/inlinecode]. Once it finds that, it looks ahead in the [inlinecode]buf[/inlinecode] text, (which is actually JSON formatted) finds the value in the text, and it returns …

Software Development c++ json
Member Avatar for crh0872
0
151
Member Avatar for slimmit

I'm trying to figure the topic out. To begin, lets say I have different sets of points in a file with the following format: 2 //1st number represents number of points within set 3, 4 //following lines are points 5, 6 3 3, 4 5, 6 6, 2 ..etc I …

Software Development java
Member Avatar for slimmit
0
90
Member Avatar for redmaverick

I am trying to execute this program, but I am getting errors this is the code [CODE] import java.util.*; public class DateUtils { static final int MILLS_IN_DAY = 24*60*60*1000; public static Date getCurrentDate() { GregorianCalendar currentDate = new GregorianCalendar(); currentDate.set(Calendar.HOUR,0); currentDate.set(Calendar.MINUTE,0); currentDate.set(Calendar.SECOND,0); return currentDate.getTime(); } public static Date createDate(int year, …

Software Development java
Member Avatar for redmaverick
-1
289
Member Avatar for Gewalop

Hi, I'm trying to write a code for Caesar Cipher, I don't seem to be able to get it right, I'm having no compiling errors, but there're some real logical errors, the encryption function is working fine, but I'm having troubles with the decryption. I'd love it if someone helps …

Software Development c++ encryption
Member Avatar for siddhant3s
0
155
Member Avatar for neutralfox

Hello, I need a little help for word multiplication, according to my notes, to multiply a word, we should put the multiplicand in AX, the multiplier in a register or memory variable and the result should appears in AX(low) and DX(high). The problem is how to get the product ? …

Software Development assembly
Member Avatar for neutralfox
0
87
Member Avatar for Alex_

Hello! I'm trying to swap some characters in this form, in Linux+NASM: abc -> cab -> bca -> abc I tried the following method [code] section .data string: db 'abc',10 strlen: equ $-string section .text global _start _start: mov ebx,1 add ebx,string mov string, [ebx] [/code] But it gives me …

Software Development assembly
Member Avatar for Alex_
0
2K
Member Avatar for denniskhor

[URL="http://rapidshare.com/files/222099783/PAS.zip.html"]http://rapidshare.com/files/222099783/PAS.zip.html[/URL] Can somebody help me check y the system stated overflow when i process...

Software Development visual-basic
Member Avatar for denniskhor
0
133
Member Avatar for hunterm

So I am trying to create a mirror image that is horizontal. I am having trouble getting the actual image to mirror because I am not sure how to go about doing this. I am using PIL 1.1.6 and Python 2.5.4, if that matters. So far I have: [code=python] def …

Software Development python
Member Avatar for hunterm
0
640
Member Avatar for Clockowl

Hey guys, I have a class with a friend function and a member function with the same name. Calling the friend function from the member function gives me an error: it looks for <classname>::<function> while the friend function is of course simply <function>. In this case, MinGW GCC says: [code] …

Software Development c++
Member Avatar for Clockowl
0
178
Member Avatar for javaAddict

Just a quick question. No rush to answer, it is not important, I might discover it later myself, but just in case someone knows it: I have been trying to create a [URL="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Method.html"]Method[/URL] object using this method: [URL="http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getMethod(java.lang.String,%20java.lang.Class...)"]Class.getMethod(String name, Class<?>... parameterTypes)[/URL] like this: [CODE] obj.getClass().getMethod(methodName, Class.forName(methodType)) [/CODE] My problem is …

Software Development api java
Member Avatar for javaAddict
0
148
Member Avatar for Cardboard Box

Hi I spent several hours yesterday trying to fix an error with one of my classes. I have a clas which handles all the resources of a game, and they are all declared as public. When a function of the same rseource class is called by another class, its meant …

Software Development vb.net
Member Avatar for nexocentric
0
92

The End.