Forum: C++ 34 Days Ago |
| Replies: 2 Views: 170 Hi,
I'm not clear as to when memory is allocated from the stack, free store or data area.Can someone please elaborate? |
Forum: C Aug 26th, 2009 |
| Replies: 17 Views: 594 I've somehow managed to fix that error through a sequence of attempts but cant figure out what fixed it. :| But the error was actually in another malloc. thanks to valgrind.
I'm stuck in another... |
Forum: C Aug 26th, 2009 |
| Replies: 17 Views: 594 Thanks.I'll try them both. |
Forum: C Aug 26th, 2009 |
| Replies: 17 Views: 594 wow..ok..the malloc casting was out of habit.I'll stop doing that
Second, are these the ONLY malloc calls in your code, or are there others?
> The WriteRiff function is in a separate program that... |
Forum: C Aug 25th, 2009 |
| Replies: 17 Views: 594 that doesnt seem to be the problem. The input to the function short int *waveform was initialized in a similar manner.It didnt cause a problem. |
Forum: C Aug 25th, 2009 |
| Replies: 17 Views: 594 I've included stdlib,no problem there.
Yes.It is an array of short ints
Here is the entire function
RiffWaveFile and RiffHeader are structures as follows. |
Forum: C Aug 21st, 2009 |
| Replies: 17 Views: 594 |
Forum: C Aug 21st, 2009 |
| Replies: 17 Views: 594 Hi,
I need an array of approx. 2,00,000 elements.But malloc fails to allocate beyond 65872.
When I give
(short int*)malloc(sizeof(short int)*65000);
It works but seg faults when I give
(short... |
Forum: C++ Apr 26th, 2009 |
| Replies: 3 Views: 264 ok...It was the return value! thanks a lot! memory leaf fixed :P |
Forum: C++ Apr 26th, 2009 |
| Replies: 3 Views: 264 Hi,
Here's my code
#include<iostream>
#include<fstream>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<stdio.h> |
Forum: C++ Apr 24th, 2009 |
| Replies: 1 Views: 293 Hi,
I'm implementing kd trees and have pseudo code for most of the functions but the delete operation.Its quite complicated and I have no idea how to implement it.Any help is appreciated |
Forum: PHP Mar 17th, 2009 |
| Replies: 6 Views: 330 Hi,
I'm new to php.I had to include common content to a lot of webpages in my website like menubar etc. and i was told i could load them dynamically from a single file using php.Can someone help me... |
Forum: C++ Feb 7th, 2009 |
| Replies: 2 Views: 251 2. no..theyre messed up.
it says -52,0,0
1. BRILLIANT!
i used a temp variable for the sprint f and it worked!!!!!!!! thanks a ton! |
Forum: C++ Feb 7th, 2009 |
| Replies: 2 Views: 251 I have a code snippet that strangely works one way on a fedora 6 machine and another way on a fedora 8 machine.
void Form1::SendToApp()
{
vector<int> isciistream;
vector<int> fontstream;... |
Forum: C++ Nov 30th, 2008 |
| Replies: 2 Views: 300 I have a c++ program that performs a functionality.
generate.h
struct code
{
bool out;
bool *reg;
};
class Cyclic |
Forum: C++ Nov 25th, 2008 |
| Replies: 4 Views: 323 still need help with this :( |
Forum: C++ Nov 22nd, 2008 |
| Replies: 4 Views: 323 Thats what I'm saying too.Let me explain bit erasure.
Lets say I transmit 01001101
theoretically, I recieve 01?01?01
ie. I dont know those bit values...though I'm in doubt now how thats even... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 4 Views: 323 Hi,
In an assignment I'm supposed to introduce packet errors and bit erasures in the packets.packet errors I can do.Bit erasures mean we have no idea if its a 1 or a 0.how can I introduce something... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 5 Views: 1,087 |
Forum: C++ Nov 22nd, 2008 |
| Replies: 5 Views: 1,087 hey..I need to convert a 8 value bool array to char.How can I do this? |
Forum: C++ Nov 15th, 2008 |
| Replies: 1 Views: 355 Hi,
I need help with implementing cyclic codes.Its much like crc.I've found a lot of software implementations for crc but havent understood them.I've looked at a crc guide which gave,
So to... |
Forum: C++ Nov 10th, 2008 |
| Replies: 1 Views: 2,819 I wrote the server and client programs.I'm sending data from server to client.
Server
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>... |
Forum: C++ Nov 10th, 2008 |
| Replies: 1 Views: 2,819 Hi,
I want to transfer a file as it is via a socket...not read the file contents and send it.How can I do this? |
Forum: C++ Nov 6th, 2008 |
| Replies: 5 Views: 481 expression parser that handles polynomials? |
Forum: C++ Nov 6th, 2008 |
| Replies: 5 Views: 481 I'm actually implementing something similar to a CRC..I need to use one of the factors to divide a message and get the remainder...any help with this is appreciated |
Forum: C++ Nov 6th, 2008 |
| Replies: 5 Views: 481 Hi,
I need to write C++ code to find the factors of a polynomial.For eg. X^2-1 should return x-1 and x+1...anyone have any ideas on how to do this? |
Forum: C++ Nov 3rd, 2008 |
| Replies: 1 Views: 277 Hi,
I'm implementing linear block coding and need some ideas on how to go about storing the cosets.
i.e.
If i have an alphabet C={000,101,010,111}
I need to perform
C+000={000,101,010,111}... |
Forum: C++ Nov 3rd, 2008 |
| Replies: 2 Views: 1,111 Hi,
I've got a program that I wish to run in a powerful server so that it can run on several cores simultaneously and work faster.I need to do client server programming for this.That is, I recieve... |
Forum: C++ Oct 20th, 2008 |
| Replies: 1 Views: 346 Hi,
We are doing some audio data collection.So I need to write a program which when run would generate a beep and record from a microphone until the next beep and save it as a wave file.This... |
Forum: C++ Oct 7th, 2008 |
| Replies: 1 Views: 592 Hi,
Thanks to everyone I was able to submit my huffman coding assignment successfully.Now I've got to do arithmetic coding and it seems really confusing.I've looked at arturo campos's page ... |
Forum: C++ Sep 26th, 2008 |
| Replies: 1 Views: 826 I'm reading a file and I'd like to get short,int etc. apart from the usual char because I want to read 16 bit values...is there a way? |
Forum: C++ Sep 26th, 2008 |
| Replies: 4 Views: 2,390 Its solved...it had to do with a declaration..thanks |
Forum: C++ Sep 26th, 2008 |
| Replies: 4 Views: 2,390 I only use new and delete and Im not freeing anywhere else except my destructors...which I commented and I still get the error...what other possibilities exist? |
Forum: C++ Sep 26th, 2008 |
| Replies: 4 Views: 2,390 I'm getting this error at the end of my program...
*** glibc detected *** ./a.out: free(): invalid pointer: 0x00617ca0 ***
======= Backtrace: =========
/lib/libc.so.6[0x684ac1]... |
Forum: C++ Sep 26th, 2008 |
| Replies: 1 Views: 641 Hi,
Whenever a user types ./a.out with the wrong number of arguments I want my program to output something like
Usage: ./a.out <-e/-d> <FIlename> <Value>
how can I do this? |
Forum: C++ Sep 25th, 2008 |
| Replies: 4 Views: 577 passed the file pointer..the seg faults stopped :)
thanks |
Forum: C++ Sep 25th, 2008 |
| Replies: 4 Views: 577 Hi,
In a function of my program, I open and close the file once every recursion...and the recursion is very large....I've made sure im not writing when its closed or not opening when its open or... |
Forum: C++ Sep 25th, 2008 |
| Replies: 6 Views: 560 yes...everything else is ok...only this character is being skipped |
Forum: C++ Sep 24th, 2008 |
| Replies: 6 Views: 560 I'm coding pdf files...and its appearing within the file...not at eof |
Forum: C++ Sep 24th, 2008 |
| Replies: 6 Views: 560 I'm sorry..i mis read my files...its actually skipping a "ÿ" from the input files...and ÿ is not in my tree |