132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Dewey1040

Im really confused, I had this recursive add function working but my teacher wants us to be able to use ++ instead of + 1... anyone know why im getting a segmentation fault on this, i feel like this is a really dumb mistake. [code=C] int add( int n, int …

Software Development c
Member Avatar for Dewey1040
0
73
Member Avatar for roachae

I have two Windows forms. Form1 has a button which, when clicked on, opens up Form2 (which looks like a drop down/combobox type of control). Form2 is a grid of buttons that look like a telephone keypad. When one of these buttons is clicked on, Form2 closes and the text …

Software Development
Member Avatar for dickersonka
0
140
Member Avatar for tomtetlaw

I am using OpenGL and i am trying to get this simple program to work, here is my code; [code=c++]void DrawScene ( void ) { glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glMatrixMode ( GL_MODELVIEW ); glLoadIdentity ( ); //Triangle glPushMatrix ( ); glTranslatef ( -1.0f, 1.0f, 0.0f ); glBegin ( …

Software Development c++ opengl
Member Avatar for tomtetlaw
0
267
Member Avatar for tonyaim83

Hi What is require is to get the path of current working directory.I m working on windows-XP. Is any function avaliable in c/c++ i could find on net #include <unistd.h> char *getcwd(char *buf, size_t size); But not working i don't know why. Can u provide small code of how to …

Software Development c++
Member Avatar for adam1122
0
6K
Member Avatar for thehivetyrant

I am trying to: [B]Implement an iterative Python function which returns the sum of the first n integers[/B] so far i have this: [code] i = 0 total = 0 def sum(n): while i <> n: total = total + 1; i = i + 1; return total [/code] then …

Software Development python
Member Avatar for scru
0
92
Member Avatar for bobrien314

I am trying to implement a breadth first search tree. I need to be able to go up and down the tree, and on each layer there can be varying amounts of nodes on each one. My problem is I've never made a tree before, and i don't know how …

Software Development java
Member Avatar for BestJewSinceJC
0
294
Member Avatar for shasha821110

Hi, all its me again! Still stuck with the STL function usage. but this time face the sort function problems! here is my class: [CODE=C++] class A { public: A( const string& filename ) { ifstream file(filename.c_str()) ; string word; while( file >> word) { _word_list.push_back(word); } } StringIntVector topNWords(size_t …

Software Development algorithm c++
Member Avatar for Narue
0
147
Member Avatar for gotm

[code=python]#!/usr/local/bin/python #Scott Landau #CS 380 #Assignment 1 Programming Portion in Python #Created - 4/6/09 #Last Edited - 4/7/09 #n is going to be equal to 4 for this queens problem. n = 4 #Assigning the empty list to initialState. initialState = [] #Making an allDirections list. allDirections = [[-1,0],[1,0],[0,-1],[0,1],[-1,-1],[-1,1],[1,-1],[1,1]] #declare …

Software Development python
Member Avatar for woooee
0
124
Member Avatar for vijaysoft1

I have a program to find the [B]Sin[/B] value of a given value(in radian) . It is working properly , but i want a better program or can u please give me a small explanation about my code . please ... in my program n=2; // what is this meaning …

Software Development c++
Member Avatar for vijaysoft1
0
155
Member Avatar for Rick3414

I am pulling a name, address, phone number from a text file. The items are delimited with a comma. I pull them into a variable. How can I pull them in or parse them out? I'm not sure if this is a tuple or a list or what, but when …

Software Development python
Member Avatar for vegaseat
0
118
Member Avatar for kelechi96

What are and how do I use vectors ? I have read some tutorials on them but I don't understand fully how they work.

Software Development c++
Member Avatar for Narue
0
117
Member Avatar for mat1989

Hi everyone. Having some issues with my program I need to make for an assignment. There is a part that needs to be able to look for upper-case letters within a html tag ( which is located in a text file) It then has to say where in the file …

Software Development c++ html-css
Member Avatar for Xlphos
0
123
Member Avatar for rmlopes

Hello, I developed an application in VC++ an now I want to compile it using GNU++ to be run on a ubuntu server (where I am actually trying tocompile it). After some syntax/usage corrections I get an error which I totally don't understand (and I don't have it in VC++, …

Software Development c++ ubuntu
Member Avatar for rmlopes
0
122
Member Avatar for shasha821110

Stuck by another problem about the vector, map functions the topnwords function is to find the top n times words occurrence Here is my code: [CODE=c++] //stringvector is the type-- //typedef vector< pair < string, int > > StringIntVector; StringIntVector TextUtil::topNWords(size_t n) const { map<string, int> freq; for(size_t i=0; i<_word_list.size(); …

Software Development c++
Member Avatar for nucleon
0
192
Member Avatar for Shabtai

The following is a statement from a program on linked lists given to us in class. I do not understand why I have to add & for address when what is passed is a pointer which means it is passed by reference.: void CharNode::headInsert(CharNode* &head, char *d) { head = …

Software Development c++
Member Avatar for siddhant3s
0
390
Member Avatar for sadiekins

Hello. I am trying to write a doubly linked list that uses data from a class. I have this class that I would like to use... [code] #include <iostream> #include <string> using namespace std; class Book { private: int PubYear; //Variables string Title, Author, Genre, Publisher; public: Book( ){}; //Default …

Software Development c++ linked-list os-x publishing
Member Avatar for sadiekins
0
100
Member Avatar for kyosuke0

hi, this is embarrassing, for whatever reason I am getting "Don't know how to make target driver.o" whenever i type make. There is only one file named "driver.cpp" in the directory that i have to compile. I am staring at tutorials and don't understand why this won't work. heres whats …

Software Development c++
Member Avatar for Duoas
0
131
Member Avatar for mangotango

I am constructing some sort of a status bar which allows the user to update their status while in a social network. It consists of an entry field and a 'update' button beside it. What I hope to do is upon activation of the button 'update' the contents in status …

Software Development gui python tkinter
Member Avatar for sneekula
0
857
Member Avatar for smsamrc

below is a method describes polynomial multiplication. all the insertTail() and insertFirst() are in the normal format of linked lists. can anyone please show me why it doesnt give me the right multiplication. [CODE] public static void mulpolynomial(String poly1, String poly2) { String[] pp1 = poly1.split(" "); String[] pp2 = …

Software Development java linked-list
Member Avatar for BestJewSinceJC
0
710
Member Avatar for shasha821110

Hi, all i have one assignment about using some of the STL to read from .txt file and count the words and find the topnwords etc. So i implement my class like that: [CODE=c++] class A { public: A( const string& filename ) { ifstream file( filename.c_str() ) ; string …

Software Development c++
Member Avatar for tux4life
0
132
Member Avatar for Alibeg

i am facing several problems.... first one is: how do i typedef a structure i've seen many ways to do it but im not quite sure which one is the right one. this is what i think how it goes (but dont know why it goes that way) [code=C] typedef …

Software Development c
Member Avatar for Alibeg
0
308
Member Avatar for kelechi96

Hello I have created a sucsessful prime number finder however I wish to retrive the start number from a file the last line shows how I tried to do this however it failed any solutions ? [code=C++]/* By Kelechi Nze My first prime project*/ #include <windows.h> #include <iostream> #include <fstream> …

Software Development c++
Member Avatar for kelechi96
0
183
Member Avatar for mat1989

Hi guys. Im doing an assignment, I am getting on ok with it but I am sadly really stuck at the moment. The part I am stuck on involves counting html tags in a text file. I have thought of a method of doing this but unfortunately I have no …

Software Development c c# c++ html-css
Member Avatar for Xlphos
0
1K
Member Avatar for f.ben.isaac

Please tell me what do you think of the written code below, is it easy to follow? Does the code tells you what it does, or you have struggled realizing whats going on? and so on. Feel free to give suggestions, tips, advices and criticize! This will help me and …

Software Development c++
Member Avatar for f.ben.isaac
0
274
Member Avatar for beckman16

Hi, I have a client application that communicates with other server modules residing on other machines. In client application, I need to know the IP address of the machine it is running on, so that it would communicate its IP to the server module(which could be separated from client by …

Software Development client-server
Member Avatar for beckman16
0
358
Member Avatar for greg022549

Going through one of my old .c file I have a line as follows: scanf("%i", &tside); I would like to convert it c++ code. Can someone show me how to do that? Sincerely, greg022549

Software Development c++
Member Avatar for adam1122
0
118
Member Avatar for sid78669

Can some suggest a good way to cleanup the HTML that is output when a perl script is run using the CGI module? I tried to install HTML::Tidy, but couldn't as i was missing libtidy. And I don't want to go through 700 lines of code and putting up loads …

Software Development html-css perl
Member Avatar for sid78669
0
81
Member Avatar for f.ben.isaac

1. Simple calculator - nothing fancy [code]/**program description: * * simple calculator written for beginners. * This program asks user to enter an arithmetic * expression that contains two numbers and one * operator. User will be given the result of the * calculation. Operators allowed to be used * …

Software Development c++
Member Avatar for tux4life
0
267
Member Avatar for aegis042404

Hi, I'm writing a small app in wxpython, on a linux box. I just want to display a graphic and play a short ogg when a gui button is clicked. Started out as a memory card game, now I just want to display the graphic and play a sound when …

Software Development display gui python
Member Avatar for lllllIllIlllI
0
362
Member Avatar for vijaysoft1

Please give me the logic or a simple program to convert a Roman letter to Numeral . Please.......

Software Development c++
Member Avatar for siddhant3s
0
100
Member Avatar for Q8iEnG

Hi mates :) how are you? I hope everything is all-right.. ;) I have a small question, it is my HW to be honest here is the question: "Write a method that calculates the following equation: f(x) = 1 if x = 0,1 √ f(x-1) + √ f(x-2) if x …

Software Development java
Member Avatar for Q8iEnG
0
109
Member Avatar for amitattri1987

I'm making a small web application in python. Transferring control from one python page to another can be done by form submit or onclick button.This happens at an event. But I'm searching for a functionality in python similar to 'server.transfer' in asp which is not event dependent. Please Help.

Software Development python web-server
Member Avatar for adam1122
0
121
Member Avatar for hurbano

this simple cout statement and i do not know why. the outputs are mixed up and i get some random numbers i didnt even input.please help [code=cplusplus] #include <iostream> #include <string> using namespace std; int main() { string Pname, CEmployer; int age; cout<<"Patients Name:"<<endl; getline (cin, Pname); cout<<"Age:"<<endl; cin>>age; cout<<"Current …

Software Development c++
Member Avatar for tux4life
0
121
Member Avatar for everydaybh

I want to create a program that asks the user to enter two vector (size and direction), and calculates its addition through turning it into components (using OOP). here's what I've got so far (I don't know how to fix the errors), I'm not sure what's wrong/ to do next …

Software Development c++ oop
Member Avatar for tux4life
0
179
Member Avatar for deppsgirl

hi. this is my first post here, my name is jen, someone in my class told me about this site and how helpful all you guys are and im so lost i thought id come try and see if someone can help me understand :( i dont even know where …

Software Development c++
Member Avatar for tux4life
0
171
Member Avatar for Doctor Cactus

Hi, I am only beginning C#, so bear with me. I have been given this program to write. This is the question: Write a C# application called WRITENUM that inputs a number between 0 and 2,000,000,000 inclusive and outputs that number in textual form, as we would say it or …

Software Development
Member Avatar for Doctor Cactus
0
78
Member Avatar for kapil.tandon

hi i created stacked column dundas chart. nw i want to put it in the flash option in the image type option but when i click on the image type property there is no option for the flash. only jpeg,bmp,ppnf etc option are there?? Moreover ,there is no optin for …

Software Development flash image
Member Avatar for kapil.tandon
0
77
Member Avatar for daffer

Hi all I am new to Java and having trouble with constructors with images and audio. I have tried to use the API library to work it out myself but cannot understand what they are talking about. My problem is that I am trying to create two instances of the …

Software Development api audio java
Member Avatar for javaAddict
0
128
Member Avatar for Cardboard Box

Hi I am making a 2D adventure/rpg game in vb.net. At the moment, the character in the game moves around a game map, and initiates battle with any enemies he comes across. The problem is that I want the terrain on the battle map to change according to the terrain …

Software Development vb.net
Member Avatar for martonx
0
88
Member Avatar for jam7cacci

my task is to sort the input numbers from lowest to highest but i just cant make it work... i've tried different ways and I know there's a problem in my code. hope you can help me out. thanks! [code] #include <iostream.h> struct trial { int age; } getcount[5]; void …

Software Development c++
Member Avatar for jam7cacci
0
176
Member Avatar for NicAx64

ahh , finally I backtrack the bug. Believe me I'm not saying that I'm experienced but many years I have been working with C++ , at least 5 yrs .I'm working with the C compiler since I was at the 7th grade. however the fun part is not boosting about …

Software Development c++ database-design gui ide
Member Avatar for Will Gresham
0
535
Member Avatar for shadowolf64

Hello everyone, I'm rather new at C# and programming in general, I have some experience with Java, PERL, and Python but I wouldn't consider myself an expert on any of them. I'm using C# because it is very similar to Java and it seems to be even easier to make …

Software Development assembly perl
Member Avatar for JerryShaw
0
132
Member Avatar for thehivetyrant

Hello there, I've a homework assignment from a while ago that asks [B]"Implement a recursive Python function which returns the sum of the first n integers"[/B] Now i just dont know exactly what it's asking and how to get started. Recursive functions, right (my thoughts so far is it'll look …

Software Development python
Member Avatar for thehivetyrant
0
127
Member Avatar for king_786

i am stuk on this and have a[solutly no idea in how to create the while loop!!! could someone please show me how to do this??? Write a Java application that calculates the number of repayments for a loan based on the initial loan amount, annual interest rate and monthly …

Software Development java
Member Avatar for BestJewSinceJC
0
110
Member Avatar for dinilkarun

Can anybody please help me with the code to read file names inside a zip file using VB6. I am able to open(not extract) the zip file.

Software Development file-system visual-basic
Member Avatar for amccaul1976
0
1K
Member Avatar for Utter_iMADNESS

Hi. I'm working on a program that rolls 2 dice a number of times and displays the number of rolls per combination. It also displays this in a bar graph that shows the percentage of times that each combination got rolled. I've gotten to the point where it rolls the …

Software Development java
Member Avatar for BestJewSinceJC
0
176
Member Avatar for thacravedawg

I have an application I'm building that requires the use of array.binarysearch() to find strings from a combobox in an array and return the index value of the selection. Ie. the user selects a name from the combobox. I now need to use the name they chose and search an …

Software Development
Member Avatar for thacravedawg
0
151
Member Avatar for TheBrenda

VB6 - Form1.Show, it is a method? Show is not on the Form Properties nor the Form Event Code. What is SHOW? Can I add code to it? Thanks

Software Development visual-basic
Member Avatar for jonc
0
715
Member Avatar for Nemoticchigga

This is a general question. I am familiar with accessors and mutators (getters and setters). I have now been reading up on semaphores. I am having trouble finding out differences between them/how they are related. Can anyone help me out with an explaination or a link? Thanks. P.S. - sorry …

Software Development c++
Member Avatar for ArkM
0
135
Member Avatar for srk619

need help on this question: Write a lexer to read in decimal numbers. If your input is the following string: “12345.9876” what do you have to do to each character in the string to generate your float? How are the numbers before the decimal point different to the numbers after …

Software Development python
Member Avatar for srk619
0
160

The End.