| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9
Comments:
<0> it's been downhill ever since. <1> cl*** MyVector : public vector { <1> }; <1> and you show it to your teacher <2> lol <3> Visual Basic is confusion distilled into a programming language. <4> Noid858 how are you supposed to implement this dynmic array? as a cl***? or as free functions? <2> rdragon: He didn't specify but I am doing it in a function format cause I feel its easier <5> hmm <4> it would be much more trivial to do it as a cl***, and just mimic what std::vector does <5> aliright c++ it is i'll get started on it tomorrow <2> rdragon: I'm not allowed to call any of the methods from the vector cl*** <4> Noid858 that's not what I said <4> cl*** Noid858sVector{ ... }; <6> shoot... ran a program and used all my memory... m***ive page swaps... so slow!!! <4> build all of the functions for adding and removing elements from your vector cl***, and have them manage the internal raw array
<3> jsaacmk: That's what you get for using genetic algorithms to balance your checkbook. <4> you can even provide iterators so your vector is compatible with standard algorithms and such <6> bah, it's only a 4096 * 32 size DFT that creates a (4096 * 32)^2 sized table... <2> rdragon: Trust me I would if he would allow it but he will not. :( <6> 17179869184 bytes <4> i thought you said he didn't specify? <4> isn't the whole point to essentially implement a dynamic array? <6> 16 TB <6> it might crash... sometime <4> template<typename T> struct Vector{ T* data; std::size_type size; std::size_type capacity; ... }; <4> s/struct/cl*** <2> Yes the point is to implement a dynamic array from scratch.. Insert a value into the front, middle and back of the array and be able to remove from the front, middle, back. <4> okay, so what's the problem in implementing it as a cl*** ? <2> Because he wrote this long *** program that we are eventually going to write ourselves. From his example program he creates a cl*** but does not mimic any vector. He uses ***erts to see if the system has enough space on the heap to create a new dynamic array. He uses memcpy to copy arrays.. <5> guys anyone know any good visual studio 2005 or visual c++ tutorials? <5> that are VIDEOS< not text <4> well, then he's doing things wrong <4> new throws std::bad_alloc if it couldn't allocate <4> but that exception should really be p***ed up to the application, I think <2> I have a **** for a professor and I gotta put up with his crap. If I want a good grade I have to do it his way. So unfortunately this ***ignment is due tomorrow. I've been working on it for 8 hours and I feel like giving up. I can't get my stupid *** program to delete a dynamic array without creating a heap exception <4> maybe you're deleting something that's already been deleted <2> http://www.noidea128.org/sourcefiles/15910.html <4> if it was all contained in a cl***, the whole implementation would be trivial <2> ^^^ do you see anything wrong with my code which wouldn't allow line 77? <4> at least put the pointer to the array, and the size in a struct <4> that would be the C way to do it <2> Ok I'm going to re-program this thing into a cl*** <4> good guy... you'll relieve all of your headaches <2> rdragon: doubt it <4> you need to store at least 3 main pieces of data: the pointer, the size, and the capacity. the size should be initialized to 0 and should change when elements are added/removed from the container. <4> the capacity is how many elements the memory that the pointer points to can hold before you need to reallocate it bigger - a decent strategy is to double the capacity each reallocation <2> Working on it <7> hi... I'm using this program that has a DLL written in C++ 6.0 and it has the source. I have to modify this dll for a project. I'm using VS .NET 2003. When I try to compile the project (so the program generates the updated DLL file) it just generates a bunch of files and says OK, but no DLL is created. Can you please help? <8> neat, it works (vista) <7> hi... I'm using this program that has a DLL written in C++ 6.0 and it has the source. I have to modify this dll for a project. I'm using VS .NET 2003. When I try to compile the project (so the program generates the updated DLL file) it just generates a bunch of files and says OK, but no DLL is created. Can you please help? <8> "bunch of files" like what? are there any errors? <7> no errors, the following files are generated: <8> VS 2005 is available, by the way <7> <name>.obj, <name>.pch, etc <7> but no <name>.dll <8> did you convert this dll project from vc6 ? verify that the project settings are set to generate a dll? <8> rebuild all? <8> paste the whole build log to the paste site <8> what does the end of the build log say? (X errors, X warnings) <7> hmm let's see, apparently it is generating the DLL in another directory, even when on Project Properties it says otherwise... let me see if that is the updated version <8> project properties > output directory <8> and/or librarian > output file <9> hi <9> what could this mean: http://rafb.net/paste/results/MIeTpG64.html ? <9> I am trying to use valarray <8> how about some code? <10> corstan it looks like somehow you've messed up calling a constructor <10> and no, I don't know how to do that <9> it's OK now <9> did this: Vector xold(m.getRows), xnew(m.getRows), b(m.getRows); <9> where Vector is a typedef <9> I should have done: Vector xold(m.getRows()), xnew(m.getRows()), b(m.getRows()); <4> what's Vector ? <9> rdragon, typedef valarray<double> Vector; <4> really need a typedef for that?
<9> yes :) <4> and you really want to call it vector? <9> that's what it is meant for <9> solution vector from a matrix-vector product <4> isnt a vector just usually an x,y,z tuple? <10> depends on the dimension <9> an array of length n could be thought of as a vector <9> in linear algebra <10> or in any geometry of dimension n <10> it can also be thought of as a point in said geometry <9> yews <10> since there seems to be a big difference between row vectors and column vectors, I would have thought you'd keep the separate <9> dealing with sparse matrices here from PDE solution techniques <9> so I am <9> jcol <9> and irow <9> that are double arrays <10> I meant as different cl***es <10> I don't give a **** how you represent them <9> ?? <9> what's the point in making cl***es for solution vectors <10> I said for row vectors and column vectors <9> just make a cl*** MyArray and implement it as a 2D array problem <10> or 1 x n and m x 1 matrixes your call <9> can someone kill that bastard ypeter92hzl <9> "***e #horny Free Chat" ??? <9> vawjr, do you see any possible failures with this statement: <9> int length = sizeof(array)/sizeof(double); <9> cout << length << endl; <9> I get 0 <9> even though array is of length 1000 <9> hm, maybe I should dereference it <9> no <9> anyone else? <4> maybe you should learn about how division works <4> (since it looks like integer division) <4> what does sizeof(array) return, and what does sizeof(double) return? <4> and what is 'array'? <9> pointer to an array <9> size of the pointer, hmm <4> why are you using a raw array? <9> wrapping up for C code <9> pretty inefficient <9> but I don't care atm. <4> unless it IS C code, there's likely no reason to use a raw array, if it's supposed to be of varying size <9> I am communicating with C functions that do not understand STL containers <9> such valarray or vector <9> ...as... <4> that's not a deal breaker <4> vector's guarantee the contents are in contiguous memory, and you can get a raw pointer to the vector's data <9> I did know that <4> std::vector<int> vec; ... int* i = &vec[0]; <9> so if I have double* array <9> as an argument to a C functiobn <9> function <9> I can use valarray<double> vec(length); ? <9> without making an explicit double array and then p*** the contents over ? <9> ok <11> ANybody in #c ? <9> yes <9> /j #c main <11> Thank you <9> rdragon, what if that vector should be const <12> hey vawjr, why are you such a ****er of cocks? do you like the taste of the skinflute? you homo faggot.. <9> in the C++ function <9> who the heck was that <9> or what <9> but just a raw double array in the C function ? <9> can I work some way around that <9> rdragon, should an inline function be like this: <9> void inline MatSparse::Jacobi1it(Vector& xnew, const Vector& xold, const Vector& b) {} or <4> get a damn book already <9> inline void MatSparse::Jacobi1it(Vector& xnew, const Vector& xold, const Vector& b) {}
Return to
#c++ or Go to some related
logs:
#MissKitten #MissKitten #linux javascript to tell which button was pressed #linuxhelp help.kdfs.net
#c++ apartments in Dubai internet city
spogmeister #teens
|
|