@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7



Comments:

<0> {4,},
<0> {7,},
<0> {6,},
<0> {6,}
<0> };
<1> i am but a simulcrum zeek
<1> how ya been bud?
<0> ??
<1> haha clones should be genetically identical :P
<2> shut up, its still early
<1> douglasCky, when you call the swpa function, how do you p*** your cost_table array?
<0> like this
<0> cost = countcost (N, store_array, cost_table );
<0> sorry is
<0> swapFunction(5, &Carray[1], *cost_table5);



<1> well, you are dereferencing cost_table5
<0> ??
<0> than how to p*** ?
<1> that would depend on the declaration of cost_table5
<1> ah, i see
<0> ??
<1> so in this case you p*** N as being 5 right?
<0> ya
<1> now look at your for loop, i < N - 1, or i < 4 which gives you the sequence of indexes 0 through 3
<1> if that inteded behavior?
<0> neuralx
<1> i suppose it would be if store_array was only 5 elements in length
<0> remember that I p*** element from 1 to 4 only ?
<1> your code is accessing beyond that range of elements
<0> neuralx I send my code to you you will know why I put like this
<0> but you don't want
<1> you are p***ing &Carray[1], then you are accessing store_array[i + 1], at i == 3, you are accessing index 4 which is beyond the end of the array
<1> it's probably crashing your program or giving bad data
<0> don't understand
<0> I can't figure out the problem now
<1> step through the loop that counts the cost. you will see that when you are calculating temp2, it is creating a bad index
<1> that bad index then gets added to your cost_array pointer, probably at an invalid address
<3> Primes fatal error LNK1284: metadata inconsistent with COFF symbol table: symbol '?primegen_init@@$$FYAXPAUprimegen@@@Z' (0A000008) mapped to '?primegen_init@@$$J0YAXPAUprimegen@@@Z' (06000001) in primegen_init.obj
<3> someone help me with that please
<2> i hate when my metadata is inconsistent
<3> help meeeeeeeeeeeeeeeeee
<4> splaps
<1> haha they still have that line in mirc
<3> someone help me
<3> help me dammit
<1> tomm, you got different function signatures. check return type and paramater list
<1> so what you been up to last couple years zeek?
<2> same ****
<3> neuralx: nah, everything is in order
<2> still at the same ****ty job, working for rice
<1> tomm, calling convention same as well?
<3> how u mean?
<2> actually had a job interview last week tho.. but they "see a lot of potential" .. which just means, "yeah, you ****, you're not good enough, go'way"
<1> lol
<1> tomm, the object file may be compiled with a different calling convention than what you are trying to link with
<3> i dunno what it means to compile with a specific calling convention
<3> is it a compiler switch?
<1> it really is hard to say. are you the creator of the obj file?
<3> er yea
<3> how else would be?
<3> *who
<3> i think its because im compiling with /clr
<1> are you compiling everything with that switch?
<3> microsoft website has a workaround, but like most microsoft workarounds it dosnt work
<3> yes
<1> i don't use microshaft compilers but i would suggest trying to do a build without any special settings
<3> done that.. removing "special settings" broke it
<1> hehe, thought it was broken to begin with?
<3> ok... it smashes it into thousands of tiny little peices
<2> kick it
<1> well, linker is definitely saying your function reference and the function as decorated in the object file are different
<3> the micro**** website says..
<3> CAUSE



<3> The earlier versions of Visual C++ may not support the C or C++ source files with the /clr switch because earlier versions of Visual C++ do not have managed code or the /clr switch.
<3> this is bull****, im using an up to date compiler
<3> then it says this..
<3> RESOLUTION
<3> Compile the unmanaged source (including the C source files) into an object file. Similarly, compile files that constitute the managed files of the project into another object file. Link the object files that are generated from the managed and unmanaged source files into a single executable by using the linker. The following steps ***ume that you have unmanaged source in UnManaged.c and that you have managed source in Managed.cpp. To build your project, foll
<3> ompile UnManaged.c with the following command:
<3> cl /c UnManaged.c
<3> 2.Compile Managed.cpp with the following command:
<3> cl /clr /c Managed.cpp
<3> but i do that and it dosnt work... compiler says /clr is an unregognized switch
<2> you dont possibly have more than one cl.exe on your system do you?
<1> yup, those steps are creating different reference and symbol names
<3> zchrist i dont see how that could possibly be
<3> neuralx, huh?
<0> cost += cost_table[temp1][temp2];
<0> error C2109: subscript requires array or pointer type
<0> what is the error ?
<1> cost_table as p***ed to your function has only one dimension
<1> the second dimension is dereferenced away...
<0> neuralx how to p*** in 2dimension ?
<0> neuralx how to correct it ?
<0> int temp1, temp2;
<0> double cost = 0;
<0> for (int i =0; i < N; i++)
<0> {
<0> temp1 = store_array[i]-1;
<0> temp2 = store_array[i+1]-1;
<0> cost += *(cost_table[temp1][temp2]);
<0> }
<1> you would have to change your function parameter list
<0> change what in my function parameter list ?
<1> see, cost_table is a pointer to double. you are trying to use it as a 2d array
<0> but I create the cost table as 2d array
<1> seriously douglas, you should learn about pointers and arrays. it's clear that you haven't mastered those concepts and that's the root of your problem here
<3> heh
<0> neuralx can you tell me how to correct it
<0> ?
<1> see, you are creating a 2d array of doubles, then you p*** it to a function that accepts a pointer to double (hence down to one dimension now)
<1> so you have essentially flattened the 2d array into a single dimension. you can't use multidimensional indexes anymore
<1> what you were doing before was correct, adding the indexes to the pointer to find the 2d element
<0> should p*** like this
<0> cost = countcost (N, &store_array[1], *cost_table );
<0> ?
<5> I'm trying to compile using the mysql c api using vc++ 2003, I end up with an unresolved external linking erroor on all the mysql calls, I'm thinking the .lib files aren't in the path properly, am I correct and where do I enter their location?
<1> *cost_table gives you a double*
<1> if you want a double[5][5] then p*** cost_table
<1> keep in mind that you must change your function prototype to reflect that it takes a double[5][] rather than a double*
<0> I stuck at here
<0> cost += cost_table[temp1][temp2];
<1> yup, cost_table does not have 2 dimensions
<0> how to change it to 2 dimension at there ?
<0> neuralx sorry for giving so much trouble
<1> but i think that goes in the wrong direction. i ***ume that since you are p***ing N, your function is designed to accept even larger 2d arrays in the future yes?
<0> yes
<1> doug, it is still a 2d array. there is no difference in the way a 1d array is stored in memory as opposed to a 2d or nth degree array
<1> cost_table points to your 2d array. but to access the elements you need to scale your indexes
<1> cost_table[temp1*N+temp2] for example
<0> cost += cost_table[temp1*N+temp2]; still stuck at here
<1> when temp1 is 1, and temp2 is 0, you are accessing element 5 in the array, which is the same as element [1][0]
<0> yes I can compile but when I run it got error
<1> this is because you are still exceeeding the higest index in your store_array
<5> if you go out of bounds on an array you will get a run time error
<1> fbsd: possibly
<5> hehe, every time I've gone out of bounds I get exceptions and crash :)
<1> it depends on how your array is in memory
<6> //server -m irc.chatw.net #chatw
<5> ahhh
<1> for exmaple you might allocate a buffer of size not divisible by whatever your data alignment size is
<1> so there will be a few bytes at the end of the array that are allocated, because of the way heap is managed by your runtime
<5> hmmm, hadn't thought of that... still not good stuffs
<0> neuralx sorry to paste a long code in private message
<0> I can't figure out where go wrong
<0> neuralx you there ?
<5> I'm trying to compile using the mysql c api using vc++ 2003, I end up with an unresolved external linking erroor on all the mysql calls, I'm thinking the .lib files aren't in the path properly, am I correct and where do I enter their location?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

#kl
#chat-world
casafever
antebin hamamlar
#india
#worldchat
#allnitecafe
#photoshop
sweetha
hrehrhrh



Home  |  disclaimer  |  contact  |  submit quotes