Forum: C++ Oct 28th, 2008 |
| Replies: 2 Views: 658 hmm, the thread name is kind of missguiding
this should better be "error linking to loki"
as you can see all your .o files compile fine, but the linking is the problem
did you build the Loki... |
Forum: C++ Oct 24th, 2008 |
| Replies: 3 Views: 465 your vector has no reserved sizes, so all insertions
//option 1
vector < vector<int> > grades;
for(int i = 0; i < 30; i++)
{
vector<int> tempVec;
for(int j = 0; j < 20; j++)
{... |
Forum: C++ Oct 20th, 2008 |
| Replies: 2 Views: 409 Anyway, this is OS dependent, but I really can't find any other way except the looping. Another way would be to check all the interrupts at kernel level and see what system calls refer to your folder... |
Forum: C++ Oct 8th, 2008 |
| Replies: 5 Views: 654 It works just fine for me. I just added the followng lines to your program:
client side:
char buff[16] = "mamaaremere";
send( sockfd, buff, 16, 0 );
server side:
char buff[16];
int... |
Forum: C++ Oct 8th, 2008 |
| Replies: 5 Views: 654 try posting the entire problem ... i mean your assignment requirements and how you thought about implementig it. Then I will probably be able to help you with it a bit more. |
Forum: C++ Oct 8th, 2008 |
| Replies: 5 Views: 654 ok, what u posted is just the connection part.
What do you mean they don't interract? I mean, u know u have to send messages from server to client and from client to server via send, recv || write,... |
Forum: C++ Oct 5th, 2008 |
| Replies: 3 Views: 730 Why bother implementig your own list when you can easly use std::list and a struct Data{ string name; int value; }; with it? |
Forum: C++ Sep 26th, 2008 |
| Replies: 13 Views: 1,319 yea, i did a simple implementation without error checking. realloc return value is not checked, true. I did that for simplicity. And don't consider main, it's just a most simple test, no free done.... |
Forum: C++ Sep 25th, 2008 |
| Replies: 13 Views: 1,319 #define ARRAYBLOCKSIZE 3
void addtoarray( int** a, size_t *length, size_t *capacity, int x, int y )
{
for( size_t i = 0; i < *length; i++ )
if ( (*a)[i] == x )
{
if ( *length ==... |
Forum: C++ Sep 24th, 2008 |
| Replies: 3 Views: 1,860 I think I understand what u mean.
I remember the old days when I was doing a simple "snake" game in pascal.
Back then I was able to do something like
repeat
repeat
.......move snake in... |
Forum: C++ Sep 24th, 2008 |
| Replies: 2 Views: 1,257 well, hexData points to unallocated memory ...
use:
char hexData[BUFFSIZE];
or
char * hexData = (char*)malloc( BUFFSIZE* sizeof( char));
u get garbage because u use unallocated memory that... |
Forum: C++ Sep 9th, 2008 |
| Replies: 5 Views: 482 yea, and when writting the assignment operator=, don't forget the assignemt to self problem |
Forum: C++ Jul 29th, 2008 |
| Replies: 3 Views: 439 #include <iostream>
#include <string>
void main()
{
int i,br=0,d=0;
//char r[200];
std::string r;
//printf("Vnesete Recenica\n");
std::cout<<"Vnesete Recenica\n"<<std::endl; |