Re: passing arrays to classes? Programming Software Development by tonakai Darray is a multidimential array of class details so you neede to use Darray[0][0] something like that in order to access details object in Darray. Darray[0][0] = name won't work because java compiler can't convert string to details. i am not sure but you might need to initilize every object in the array before you are going to use them. May … ASCII art help Programming Software Development by tyczj im trying to make a table using askii art thats changed when the dimensions of the array are changed. i have been playin it for like 2 hours and i cant figure it out, here is was i have so far. my definitions [CODE]#define M char (197); #define U_L char (218); #define L_L char (192); #define U_R char (191); #define L_R char (217); #… moving around in an array with arrow keys Programming Software Development by tyczj i am totally stumped on what to do here. basically whats goin on is i have a 3D dynamic array and i need to have a cursor inside of it and move around on the inside. i do i go about doing that? like i said im completely stumped. here is my code: [CODE]#include <iostream> #include <conio.h> #include "Definitions.h" … Re: moving around in an array with arrow keys Programming Software Development by iamthwee [QUOTE=tyczj]i am totally stumped on what to do here. basically whats goin on is i have a 3D dynamic array and i need to have a cursor inside of it and move around on the inside. i do i go about doing that? like i said im completely stumped. here is my code: [CODE]#include <iostream> #include <conio.h> #include "Definitions… template errors Programming Software Development by tyczj i have 3 errors that i cant figure out y they are appearing i thought everything was fine [CODE] template <class TYPE> class Darray{ protected: TYPE DEPTH; TYPE ROW; TYPE COL; Cell *** array; public: Darray(); //constructor Darray(TYPE depth, TYPE row, TYPE col); //overloaded constructor ~Darray();… Game: Extending a dynamic array library Programming Software Development by deceptikon Provided below is a bare bones dynamic array library. The game is to extend this library with new primitives and features that interest you, that you've needed in the past, or that you feel may be useful. The intention of this game is to give some of the newer folks a chance to get some design experience, but it's by no means limited to beginners; … Re: template errors Programming Software Development by dwks [code]Darray& Darray::operator= (const Darray& darray); //assignment operator[/code] -> [code]Darray& operator= (const Darray& darray); //assignment operator[/code] Re: ASCII art help Programming Software Development by tyczj so i got it to print how i want it to but i cant get it to show the right numer of rows and columns. [CODE]void Darray::print () const { // makes inside of grid for(int d=0; d<DEPTH; d++) for(int r=0; r<ROW; r++) for(int c=0; c<COL; c++) { cout << LINE; cout << T_M; cout << LINE… Re: moving around in an array with arrow keys Programming Software Development by tyczj ok i figured out the arrows but now i have to get the cursors in there rerwiten grid class [CODE]class Grid : public Darray { private: int currentRow, currentDepth, currentCol; bool visit, active; public: Grid(); void arrow_keys(); void UsFunction(); void DsFunction(); void clear_screen(void); void print () const;… How Change the Format of Selected Date from Calendar Programming Web Development by lasano I have a calendar and when selecting the date the date format inserted to text box is in the format ' 10/10/2010'. This is not getting inserted into oracle database. Oracle accepts only the format '10-OCT-10' . So please help me to change the format of date that getting selected from calendar. Code is given below //calendar.html [CODE]<… Re: Game: Extending a dynamic array library Programming Software Development by deceptikon So that the additions and suggestions aren't lost to github, here are two more public functions and one private helper. The first is a generic swap, since the storage for the darray may be confusing and awkward to work with directly. The second is a heapsort implementation: static bool do_heap(darray *p, size_t i, size_t n, int (*cmp)(const … Re: Game: Extending a dynamic array library Programming Software Development by deceptikon > I am planning write a push_back interface for the Dynamic Array(as in the std::vector in C++). I actually included that functionality at first, where there was both a size and capacity member in the darray. But there was an intended usage problem. With an automatically growing dynamic array you basically have to take full control over the … Re: Game: Extending a dynamic array library Programming Software Development by deceptikon Nice. Good idea to put it in public version control. :) Two suggestions though: 1. Since darray_compare_bytes() is basically reinventing memcmp(), why not just use memcmp() to begin with? 2. The function comment for darray_compare_bytes() is a copy paste of darray_search(), you forgot to change it. ;) It's fun seeing how different people write … Re: Game: Extending a dynamic array library Programming Software Development by myk45 Hi, I am planning write a push_back interface for the Dynamic Array(as in the std::vector in C++). But somehow, i am not finding an elegant solution. All i can think of is some kind of a linked-list approach. struct darray { size_t item_size; /* Size in bytes of each item (homogeneous) */ size_t capacity; /* Number of … Re: Game: Extending a dynamic array library Programming Software Development by myk45 Hi, @deceptikon: Added your changes + insertion sort Also, another small function to return all occurances of some data into a bytestream /* @description: This function copies all occurances of some data into a separate byte stream. */ extern void darray_find_all_occurances(darray *d_array, void* data, unsigned … Templates in C++ Programming Software Development by chubbywubba I have these two class and I have to make the Dynamic3DArray class a template. I started it but now I am lost and I do not know where to go or what to do. I tried looking online but nothing I find I can seem to understand. Can someone please help? Dynamic3DArray class [code] #ifndef dArray_H_ #define dArray_H_ #include "node.h" … Re: Copy Constructor For a Deque Programming Software Development by Ancient Dragon Here is the complete file, just in case I changed something that I forgot to tell you about. Looks like I did change the constructor, but I don't see how that could have corrected anything other than when the parameter to the constructor is 0. [code] #include "Deque.h" #include <iostream> #include <iomanip> using namespace … Re: Copy Constructor For a Deque Programming Software Development by lancevo3 Here is what I got perhaps you'll catch something I did not. [code=cplusplus] #include "Deque.h" #include <iostream> #include <iomanip> using namespace std; Deque::Deque(int MaxSize) { dMaxSize = MaxSize; dArray = new int[dMaxSize]; dSize = 0; dFront = 0; dRear = dMaxSize - 1; } Deque::~Deque() { delete[] dArray… Re: Copy Constructor For a Deque Programming Software Development by Ancient Dragon You apparently didn't make the changes I suggested [code] Deque::Deque(const Deque& oldDeque) { dArray = new int[oldDeque.dMaxSize]; for (int i = 0; i < oldDeque.dSize; i++) dArray[i] = oldDeque.dArray[i]; dMaxSize = oldDeque.dMaxSize; dSize = oldDeque.dSize; [color=red] dFront = oldDeque.dFront; dRear = oldDeque.dRear;[/… Re: Copy Constructor For a Deque Programming Software Development by lancevo3 I went ahead and made the changes [code=cplusplus] Deque::Deque(const Deque& oldDeque) { dArray = new int[oldDeque.dMaxSize]; for (int i = 0; i < oldDeque.dSize; i++) dArray[i] = oldDeque.dArray[i]; dMaxSize = oldDeque.dMaxSize; dSize = oldDeque.dFront; dRear = oldDeque.dRear;… help with writing an overload function template Programming Software Development by dallaseve [QUOTE]Hi, I am back again and need some more help please. I have to write a template that performs a bubble sort, and then I need to write an overload function template prinArray. I have the first part (well with a double, couldn't make the float work) but I'm lost on the second part[/QUOTE] [QUOTE]Here is the assignment: Write a function … Copy Constructor For a Deque Programming Software Development by lancevo3 I am having trouble with my copy constructor for a Deque program I am writing. It just does not seem to be doing any copying anyone notice a quick fix on this? [code=cplusplus] Deque::Deque(const Deque& oldDeque) { dArray = new int[oldDeque.dMaxSize]; int sub = oldDeque.dMaxSize; for (int i = 0;… Re: Copy Constructor For a Deque Programming Software Development by lancevo3 This is what I came up with and now get a segmentation fault. [code=cplusplus] Deque::Deque(const Deque& oldDeque) { dArray = new int[oldDeque.dMaxSize]; for (int i = 0; i < oldDeque.dSize; i++) dArray[i] = oldDeque.dArray[i]; dMaxSize = oldDeque.dMaxSize; dSize = oldDeque.… Re: Copy Constructor For a Deque Programming Software Development by Ancient Dragon Problem is in the constructor [code] Deque::Deque(const Deque& oldDeque) { dArray = new int[oldDeque.dMaxSize]; for (int i = 0; i < oldDeque.dSize; i++) dArray[i] = oldDeque.dArray[i]; dMaxSize = oldDeque.dMaxSize; [color=red] dSize = oldDeque.dSize; dRear = oldDeque.dRear; dFront = oldDeque.dFront;[/color] } [/code] passing arrays to classes? Programming Software Development by ultimate_fusion //main method int number = 1; int num = 3; details[] Darray = new details[number][num]; String name = JOptionPane.showInputDialog(null, "Enter the name", "Enter details", JOptionPane.QUESTION_MESSAGE); String DOB = JOptionPane.showInputDialog(null, &… Finding Max Values Programming Software Development by stabler_rocks Okay i'm probably majorly over thinking this but i need to create a counter that counts how many weeks a certain value gets exceeded, except i honestly don't know how to do it. I thought of find the end max value and taking it away from the first max value except i can't get the last max value. here's some of my code: i = 1 maxindividuals=0 … help with cheacking in 3D Tic-Tac-Toe Programming Software Development by tyczj i need some help with figuring out how to check diagonals in my 3D Tic-Tac-Toe board. i have the horizontal, vertical and depth done fine but i cant figure out how to get diagonals. i only put in the check part since the full code is really long. the peoblem is that im making it to that you choose wha cubic dimensions you want and i dont know how … Dynamic Array Help Programming Software Development by wsn Hi, I can't figure out what is wrong with the code after trying to fix it for the last six hours i decided to give, please i need help =( big time I'm trying to make a dynamic array of structures then printing the output of the elements but I haven't successed in either storing the elements of the structure in the array nor printing it [code… Re: assignment operator for a 3d array Programming Software Development by tyczj here is my whole code but i think i figured it out though. the code has what i changed in it. and i see what your saying now though [CODE]#include <iostream> #include "ArrowKeys.h" using namespace std; class Darray{ private: int DEPTH, ROW, COL; int*** array; public: Darray(); Darray(int depth,… Re: How to read csv file contents in VB.Net Programming Software Development by Turtle28787 Build a form, add the following to it: Listbox1 button1 With all due respect, I find Microsoft's VisualBasic streamreader lacking. For a no-holdup-does-not-rely-on-other-plugin-crap I wrote a script that will load a .csv into a two-dimensional array, and for giggles, pump it back onscreen in a listbox, showing separation in the array with a pipe…