659 Topics

Member Avatar for
Member Avatar for salty11

This is one part of my program, I need a loop that checks through the input(specifically the agent numbers) and then outputs the agent numbers that aren't in the input, from 1 to 20(because there should only be 20 agent). [CODE]void not_part() { ins.open(in_file); int i=0; int sum=0; cout<<"AGENTS WHO …

Member Avatar for WaltP
0
126
Member Avatar for stemiros

Hi, I have a list of base types which stores multiple derived types. The following code shows a simplified setup. [CODE]#include "Base.h" #include "DerivedA.h" #include "DerivedB.h" #include <iostream> #include <list> void main() { std::list<Base*> base; std::list<Base*> *basePointer = &base; for (int i = 0; i < 10; i++) { basePointer->push_back(new …

Member Avatar for mrinal.s2008
0
2K
Member Avatar for SeanC

Hi all, I'm currently trying to solve a problem with a JList. I've got an actionPerformed event applied to the JList (also tried the item updated event but it has the same effect), and whenever this event is fired, (i.e. the user makes a selection), something happens. Now, the problem …

Member Avatar for Ezzaral
0
397
Member Avatar for rockerjhr

globals.h [CODE] #ifndef _globals #define _globals #define NEXT(L) ( (L) -> next ) #define DATA(T) ( (T) -> datapointer ) #define LEFT(T) ( (T) -> left ) #define RIGHT(T) ( (T) -> right ) typedef enum { OK, ERROR } status ; typedef enum { FALSE=0 , TRUE=1 } bool …

Member Avatar for WaltP
0
180
Member Avatar for lilbenji25

Hey, i know you are all probably very bored with the infix to postfix program and its many incarnations but i seem to be having a problem getting the linked list we have to use as a stack to work. More specifically; pushing to the stack, reading from the top …

Member Avatar for nezachem
0
179
Member Avatar for RapidFire4Life

Hi, I was given the following problem, I've almost got it but I've hit a roadblock and having no luck getting past it. Here is the problem im supposed to solve... The function insert of the class orderedLinkedList does not check if the item to be inserted is already in …

0
260
Member Avatar for dondajr

Hi everybody o/. I'm studing Linked List in C. I made two functions: add ( add data on the list) and destroy (destroy the list). For now, it's just this two functions that i need, but the function destroy doesn't works well. When I call the function destroy only the …

Member Avatar for dondajr
0
265
Member Avatar for |Mike|

Hello! I'm trying to modify opensourced application but due to lack of knowledge, I'm stuck. Explantions are in the comments of the app :-) Thanks in adavance for your support! [CODE]void CBaseGame :: FixSlots( ) { struct Struct1{ list<string> UserList; list<CGameSlot> PlayerSlots; }; list<string>::iterator IT; list<CGameSlot>::iterator TI; for( vector<CGamePlayer *> …

Member Avatar for mike_2000_17
0
229
Member Avatar for comSysStudent

Hi all, I have a programming assignment to store sparse matrices using a list<list <myclass> >. I have pretty much everything nailed down but I'm going wrong at some point, the output is incorrect. Instead of giving me 4 lines with the column position and value of non zero values …

Member Avatar for comSysStudent
0
188
Member Avatar for leftovas17

Yes, I have looked in the forums for answers and have found plenty, and am asking about what I could not find. And yes, this is homework, but I need help and my professor has not responded thus far... now on to business. Description of Goal: Make a Set Data …

Member Avatar for leftovas17
0
473
Member Avatar for yoge911

hey guys, need some help ,(newbie to vb.net). i have made a successful parental control type application . i want the application to hide in add/remove program list in control panel or implement password uninstallation of the application? Any other ideas are also appreciated. please suggest your ideas

Member Avatar for Nikon70
0
99
Member Avatar for spe_eddy

I am wanting to refer to a number of items from the end of a list, but can't get the syntax right, [CODE]previousDays = 5 pDaysRange = (31-previousDays,32)[/CODE] previousDays is the variable I can change, there are 31 days in the month so i'm trying to take the last 5 …

Member Avatar for spe_eddy
0
140
Member Avatar for leeggodfrey

Hello All, I have a very simple search cursor that is selecting from a table a list of names in order to query a database. It was working fine until I encountered a name with an apostraphe in it. O'Brien for instance. The search cursor is very basic. [CODE] inCur …

Member Avatar for leeggodfrey
0
166
Member Avatar for spe_eddy

[CODE]testingdays = testingData.getMeasurements() for day in testingdays: dayValues = [] dayValues[0].append(day.tempMean) dayValues[1].append(day.tempMax) dayValues[2].append(day.tempMin) dayValues[3].append(day.dewPoint) dayValues[4].append(day.humidMean) dayValues[5].append(day.humidMax) dayValues[6].append(day.humidMin) dayValues[7].append(day.pressure) dayValues[8].append(day.meanWindSpeed) dayValues[9].append(day.maxWindSpeed) dayValues[10].append(day.maxGustSpeed) dayValues[11].append(day.visibility) [/CODE] this is my code and when i try to run it i get the error message: "Traceback (most recent call last): File "main.py", line 166, in <module> …

Member Avatar for TrustyTony
0
3K
Member Avatar for axman1000

I have a list of values extracted from a datareader in a list. Is it possible for me to run a query to extract another set of values using a datareader and then use the individual values in the list and the values in the datareader to perform some calculation, …

0
93
Member Avatar for hauda67

Is it possible to write a method and declare something like [CODE]Node currentNode;[/CODE] to "scan" through each nodes in the list, and saving to file. I guess I can use [CODE]import java.io.*;[/CODE] to declare the necessary file stream variables. Would really appreciate some ideas and tips on how to approach …

Member Avatar for jon.kiparsky
0
139
Member Avatar for Rimojenkins

I'm getting a segmentation fault at this line. So far, my program has classes. A blahpod with class of songs in them. Then there is the node class. I call the operator= which is supposed to put one pod into another. It looks like so [CODE]bobcatPod bp2( bp1 );[/CODE] That …

Member Avatar for Rimojenkins
0
157
Member Avatar for silence02

Hello all. I am new to programming, taking my first class in college. Im enjoying it a lot so far, and much of the info on daniweb has been a huge help. Due to some unforeseen circumstances, I had to miss class and am now having some troubles with a …

Member Avatar for silence02
0
3K
Member Avatar for andrewschools

Hello - Looking to find a function that works just like the php function uasort() but have it maintain the relative order of items when equal keys are found. Here's my code now: [CODE] $array = array("item1"=>-1,"item2"=>-1,"item3"=>-1,"item4"=>0,"item5"=>2,"item6"=>2,"item7"=>1); function sortThis($a,$b) { if( $a == -1 || $b == -1 ) { …

Member Avatar for redfox23
0
2K
Member Avatar for devin2203

Hi all Am trying to Truncate the end of a linear list in java. so that: [CODE] // reduce the size of the list to s by removing all elements // with indices greater or equal to s; return the number of removed // elements; // for example, if the …

Member Avatar for devin2203
0
457
Member Avatar for RicardoE

Well first of all, I want to know if it is true, is Linq faster than default Collections methods like, contains(), size() etc... for example if I load a 3MB text list into a List<T> to find a specific string, will it be faster to use Linq or normal methos …

Member Avatar for Momerath
0
129
Member Avatar for DLKenji

Alright guys, I'm in quite a situation. I have a project for school to create an application in C++ that can create and generate shopping dockets/receipts. This includes being able to add the names of the items, the prices, and then finding the total price of the purchase. We can …

Member Avatar for WolfPack
0
704
Member Avatar for tombliboo

Hi python fans, hope someone can help me with this. I have a text file the result of another program which looks like: 2,6,3,5,0 4,0,2,5,2 5,7,9,1,0 4,6,8,2,5 2,7,9,1,6 This may vary in size but will always be square i.e. 5x5, 9x9 etc so the code needs to accomodate this, the …

Member Avatar for snippsat
0
179
Member Avatar for failbot

So, I'm writing an implementation of List in C++ as a programming exercise, so far I have this: [CODE]#include <iostream> #include <algorithm> using namespace std; template <class T> class Link; template <class T> class List_iterator; template <class T> class List { public: typedef List_iterator<T> iterator; List(); List(const List<T> & l); …

Member Avatar for failbot
0
343
Member Avatar for BirdaoGwra

Hi, It is my code: [CODE]mylist = [['fiss','giss'], ['e','h'], ['d','u'], ['c','t'], ['b','o'], ['a','z']] for alist in mylist: g = ' '.join(alist) print g f = open("write.txt", "w") f.write(g) f.close()[/CODE] How will I write all the words in the txt file. it is only writing the last line of the file. …

Member Avatar for Tommymac501
0
135
Member Avatar for dwlamb

Good day, I've run into a problem with list items displayed inline (i.e., horizontally) using Safari for Windows. If you [URL="http://dwlamb.com/cssproblem/loggedin.html"]follow this link, you'll find an uploaded static version of the problem[/URL]. Viewing it in IE7-8 and Firefox (Windows & Linux), the page yields as it should. The 4 menu …

Member Avatar for dwlamb
0
228
Member Avatar for GreaseJunkie

Hi everyone, I have a project I'm working on where I am collecting data for a client on a form I host. They use "MailApe" (you know who I'm talking about), who aren't a very helpful group of monkeys. I need to collect the data to my db from my …

Member Avatar for GreaseJunkie
0
222
Member Avatar for WinterDawn10

[url]http://www.facebook.com/photo.php?pid=608407&l=36ae49bbf4&id=100000539331398[/url] check out this picture.. i want to make one of my lists to be shown in this way.. whenever you click the '+' sign, the products under the main products will be displayed, and when you click the '-' sign, the products under the main products will be hidden.

Member Avatar for WinterDawn10
0
147
Member Avatar for iamthesgt

This is homework. I am not asking for someone to write this code for me, just to help me understand how to solve my problem. I have to take two lists or integers inputted by the user, sorted in ascending order and combine them using pass-by-reference to return a pointer …

Member Avatar for iamthesgt
0
275
Member Avatar for JCWatson

Hello, I am new to daniweb. I am a student in my first coding class and I am stuck trying to figure out one of my projects. My teacher wants me to have a text box that you can type a number in, then add it to a list box …

Member Avatar for debasisdas
0
114

The End.