Search Results

Showing results 1 to 40 of 99
Search took 0.01 seconds.
Search: Posts Made By: guest7
Forum: C++ 7 Days Ago
Replies: 1
Views: 155
Posted By guest7
Hello,

I am having trouble in using the data member of class 1 in the member function of another class 2. Following is my code.

class a {
public:
a();
~a();

...
Forum: C++ 14 Days Ago
Replies: 0
Views: 166
Posted By guest7
Hi,

I have two directories and each directory has a *.cpp and *.h and a Makefile. I am also creating an instance of the class of program1(in one directory) in program2(in other directory). I have...
Forum: Shell Scripting Oct 17th, 2009
Replies: 2
Views: 601
Posted By guest7
Hi,

I am trying to replace the old_string with the new_string using sed.
But i am unable to do it using the following script.

#!/bin/sh

old_string="p cnf 10 20"
new_string="p cnf 98 99"
Forum: C++ Jun 10th, 2009
Replies: 6
Views: 470
Posted By guest7
Can someone help me with possible cause of errors.
Forum: C++ Jun 10th, 2009
Replies: 6
Views: 470
Posted By guest7
sorry for the incorrect code. I have corrected the code.
Forum: C++ Jun 10th, 2009
Replies: 6
Views: 470
Posted By guest7
Hi,

Sorry that is a typo. it is operation2

Thanks
Forum: C++ Jun 10th, 2009
Replies: 6
Views: 470
Posted By guest7
Hello,

I am getting the follwoing error in my program:

*** glibc detected *** free(): invalid pointer

The program is as follows.

int main()
{
Forum: C++ Jun 9th, 2009
Replies: 3
Views: 235
Posted By guest7
Hi,

I have a simple c++ program. I am using the API's of the utility in my C++ program. For that i am compiling the program with the option:

g++ prog1.cpp -I../include -L../lib

However i am...
Forum: C++ Jun 9th, 2009
Replies: 3
Views: 235
Posted By guest7
Hi,

I have a c++ program which uses the api's of a utlitiy. As per the document I have to include the path of binaries for the utility in my code. I am not sure why that is required and how to...
Forum: C++ May 1st, 2009
Replies: 3
Views: 293
Posted By guest7
My code has 3000 lines and i do not know in which function the error is..so i did not paste the code.
Forum: C++ May 1st, 2009
Replies: 3
Views: 293
Posted By guest7
Hi,

I wish to know that the cause of the following error when i run the program :
a) Is memory leak in the program
B) The system on which i am running the program has insufficient memory.
...
Forum: C++ Apr 30th, 2009
Replies: 9
Views: 340
Posted By guest7
oh no..i did not mean that....sorry for the confusion. i have written the complete code and compiled it and ran it on many benchmark...in fact the error i get is for bigger benhmarks only.....
...
Forum: C++ Apr 30th, 2009
Replies: 9
Views: 340
Posted By guest7
i am using g++ compiler. I am sorry about the missing variables and functions. The code is so big that would not be possible to post the complete code. since the backtrace gave error in this...
Forum: C++ Apr 30th, 2009
Replies: 9
Views: 340
Posted By guest7
Following is the class description:

class circuit
{
// circuit information
int **output; // output of the gate
int *flag; // flag for every gate
int *count_gate; ...
Forum: C++ Apr 29th, 2009
Replies: 9
Views: 340
Posted By guest7
Is there something wrong in my code.
Forum: C++ Apr 29th, 2009
Replies: 9
Views: 340
Posted By guest7
Hi,

Following is my code.

void circuit::more_illegal(int maxno2, char *fname, int CONST_INITIAL_STATES)
{
int kf=1;
std::string ans;
int prev_kf = CONST_INITIAL_STATES+1;
more_states...
Forum: C++ Apr 29th, 2009
Replies: 9
Views: 340
Posted By guest7
Hi,

I am getting the following error in my code.

malloc: *** error for object 0x3b0fe80: double free
*** set a breakpoint in malloc_error_break to debug

When i debug it and do a backtrace...
Forum: C++ Apr 28th, 2009
Replies: 9
Views: 345
Posted By guest7
Hi,

i wish to know when i do the following code how it is taking care of "EOF" and "\n".

#include <iostream>
#include <fstream>
#include <vector>

using namespace std;
Forum: C++ Apr 28th, 2009
Replies: 9
Views: 345
Posted By guest7
Thanks for the help...
Forum: C++ Apr 28th, 2009
Replies: 9
Views: 345
Posted By guest7
Thanks...No there is only one. could u please tell me what is the purpose of :

"cin.get()"
Forum: C++ Apr 28th, 2009
Replies: 9
Views: 345
Posted By guest7
I am using fscanf because i need numbers with positive and negative sign I only know getline which returns string in c++.

I am not sure how can i do in c++. I need the numbers so that i can...
Forum: C++ Apr 28th, 2009
Replies: 9
Views: 345
Posted By guest7
Hi,

Thanks for the help. i have one doubt... I am doing this now. I am not sure I should equate fscanf to "NULL" or "0". i believe that NULL stands for new line character.

FILE...
Forum: C++ Apr 28th, 2009
Replies: 9
Views: 345
Posted By guest7
Hi,

I have to use fscanf to read the numbers in a line. The line is in the file "FileName1" and may or may not have EOF.
I am using the following code and it is stuck in an infinite loop.

...
Forum: C++ Apr 27th, 2009
Replies: 3
Views: 531
Posted By guest7
hi,

i am not sure i understand ur question. The file has 2000 lines and getline gives a segmentation fault after reading line number 891

Thanks
Forum: C++ Apr 27th, 2009
Replies: 3
Views: 531
Posted By guest7
Hi,

Following is the function which is giving me a segmentation fault.
I do not know what is wrong in this code. I am counting the number of lines in the file.


char...
Forum: C++ Apr 24th, 2009
Replies: 1
Views: 752
Posted By guest7
Hi,

i wish to know the difference between the following two code?

ifstream fin(fname,ios::in);
vector<string> temp;

while(getline(fin, line)
{
temp.push_back(line);
Forum: C++ Apr 16th, 2009
Replies: 6
Views: 711
Posted By guest7
The file has 1500 lines and when it reads the line number 891 in the file it gives me this error:

"Program received signal SIGSEGV, Segmentation fault.
0xb759cb36 in...
Forum: C++ Apr 16th, 2009
Replies: 6
Views: 711
Posted By guest7
I tried using vector instead of deque and i am clearing the vector using clear() method and then resizing it to 0 using the resize() method. But I am still getting the error. Is there any other thing...
Forum: C++ Apr 16th, 2009
Replies: 6
Views: 711
Posted By guest7
Hi,

I am getting "Segmentation fault" error in line number in the following function.


deque <string> text;
deque <string> text_1;

int circuit::writetofile(int maxno,char *fname)
{
Forum: C++ Apr 14th, 2009
Replies: 5
Views: 228
Posted By guest7
How can i check the buffer overflow or reading from some memory location outside the segment. I will try to post a small code....
Forum: C++ Apr 14th, 2009
Replies: 5
Views: 228
Posted By guest7
Hi,

I am getting the error "Segmentation fault" when i run my program. Then when i debug the code to find the cause of the error i get the following error messages. I do not know what these error...
Forum: C++ Apr 12th, 2009
Replies: 13
Views: 511
Posted By guest7
Hi,

How can i delete the file in the middle of the program in C++

Thanks
Forum: C++ Apr 12th, 2009
Replies: 1
Views: 470
Posted By guest7
Hi,

I wish to remove the extra unwanted characters in the file name.

f1::f1(char *filename1)
{
char file_txt[40];
strcpy(file_txt,filename1);
strcat(file_txt,".txt");
Forum: C++ Apr 7th, 2009
Replies: 4
Views: 213
Posted By guest7
Hi,

I am getting the following error while compiling the code on linux machine.

"aggregate value used where an integer was expected"

I am getting this error on a simple for loop. I do not...
Forum: C++ Mar 28th, 2009
Replies: 3
Solved: Error
Views: 246
Posted By guest7
Thanks.. the error is resolved......the suggestions are really helpful...
Forum: C++ Mar 28th, 2009
Replies: 3
Solved: Error
Views: 246
Posted By guest7
Hi,

I am getting the following error when I am trying to initialize a 2 dimensional vector with 0's.
I am not to figure out the reason. Any help is appreciated.


std::vector<int>...
Forum: C++ Mar 25th, 2009
Replies: 2
Views: 241
Posted By guest7
Hi,

I am comparing two file to find if they have common strings. My program is not doing that and I cannot figure out the reason. Any help is appreciated. Following is my code:

int main()
{...
Forum: C++ Mar 11th, 2009
Replies: 2
Views: 385
Posted By guest7
Hi,

I am trying to compare two strings. When i enter two arguments on the command line 12 and 100, the flag1 should be set to 1 because
(argv[1] =) "100" > (junk2 = )"13". But this is not...
Forum: C++ Feb 28th, 2009
Replies: 3
Views: 462
Posted By guest7
Hi,

I have tried this also:

while((junk.compare(junk1)) != 0)
{
inFile >> junk;
}
Still getting a segmentation fault. Am i using compare correctly now?
Forum: C++ Feb 28th, 2009
Replies: 3
Views: 462
Posted By guest7
Hi,

I am getting a segmentation fault at the following line in the code. I am reading a file using ifstream. The file contains some initial junk data followed by useful data. I wish to read and...
Showing results 1 to 40 of 99

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC