Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
62% Quality Score
Upvotes Received
12
Posts with Upvotes
12
Upvoting Members
1
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
2
2 Commented Posts
0 Endorsements
Ranked #4K
~3K People Reached
Favorite Forums
Favorite Tags
c x 17
c++ x 10
Member Avatar for Iqbal_h_a

Hi Guys, I have a question on C++ object creation. Please consider the following code snippet. [code] class Foo { private: int i; public: A(int ii):i(ii) {}; }; int main() { const Foo &ref = Foo(1); } [/code] Here I am bit confused about the line : const Foo &ref …

Member Avatar for kvprajapati
0
99
Member Avatar for Iqbal_h_a

[code] Can anybody please tell me how to calculate/find total remaining(unused/free) memory in the system(using any functions)? Thanks Iqbal [/code]

Member Avatar for wsgeek
-1
449
Member Avatar for Iqbal_h_a

Hi All, I am struck with following problem. Please help me out. I have defined a Oracle procedure as follows. [code] PROCEDURE JOB_EXPORT IS cur CWTYPES.cursorType; l_nextdate DATE; -- JOB_NEXT_RUN l_interval VARCHAR2(64); BEGIN OPEN cur FOR SELECT JOB_NEXT_RUN, JOB_INTERVAL FROM JOB_EXPORT_CDRS WHERE ACTIVE_STATUS=1 AND JOB_INTERVAL IS NOT NULL LOOP FETCH …

Member Avatar for Iqbal_h_a
0
156
Member Avatar for Iqbal_h_a

Hi All, I have a doubt regarding "threadsafe". Consider the following scenario.... [inlinecode] Thread #1: fun1() { lock(); writestring(ptr, pconfig); unlock(); } Thread #1: fun2() { lock(); writestring(ptr, pconfig); unlock(); } bool writestring(char *ptr, char *pconfig) { //this code should not be shared across threads. One thread should access at …

Member Avatar for Ancient Dragon
0
94
Member Avatar for Iqbal_h_a

Hi All, I have built an application on C++. It is a multi threaded application. My application spawns 8 threads when it come up. Each thread opens one file and maps it using mmap. It is a client-server application. Each thread picks up a message from the queue and processes …

Member Avatar for Nick Evan
0
117
Member Avatar for Iqbal_h_a

The following is the core dump got from the application crash(just took a line from the core dumped file). [code] 003af9dc memcpy (0, 0, 4629e8, 4629e8, 0, fbc06e65) + e8 [/code] I could not understand what it is trying to say here. As memcpy takes three parameters, here it is …

Member Avatar for Iqbal_h_a
0
215
Member Avatar for Iqbal_h_a

[code] #include<iostream> using namespace std; class test { public: void display() const { cout<<"Hai Here in class"<<endl; } }; int main() { const test b; b.display(); } [/code] When I execute the above code I got an error saying "uninitialized const b". But if I provide a default constructor it …

Member Avatar for Iqbal_h_a
0
171
Member Avatar for Iqbal_h_a

When I compiled the follwing code snippet, it compiled without any error. My question is if it is allowed to declare [I]char[/I] fields inside a structure, then how can I store character string in that variable(we can not use functoins like strcpy:-| ). OR Is it not allowed to declare …

Member Avatar for Salem
0
212
Member Avatar for lilprogrammer

Hi, I am trying to convert a string length to a char and store it in an array. For some reason, even though its not giving me any error, when I try to print the array out, the place where I store the strlen is blank. Here's my code: [code] …

Member Avatar for andor
1
388
Member Avatar for Iqbal_h_a

I have a doubt on function returning a value. Consider the following program snippet. [code] int add(int a,int b) { int c=a+b; return; } int main() { int a=10,b=20; printf("%d %d %d",a,b,add(a,b)); return(0); } [/code] The above program gives the output as 10 20 30 But the function is not …

Member Avatar for Iqbal_h_a
0
116
Member Avatar for dsraju

Hi all,I am having some doubts in C. 1>> My program needs to allocate memory of 256*256 array of integers ie array[256][256]. But it cannot be allocated statically.So pls suggest me how to allocate memory of 256*256 integers dynamically.My code below given is unable to allocate memory and is returning …

Member Avatar for Iqbal_h_a
0
288
Member Avatar for Iqbal_h_a

[code] Please look at the following code snippets: char str[]="abcd"; // Gets stored in stack frame. char *str="abcd"; // Where does this gets stored? In case of first declaration ie char str[]="abcd"; the string "abcd" gets stored in the stack frame of the invoked funciton. I wonder where does the …

Member Avatar for ~s.o.s~
-1
198
Member Avatar for Iqbal_h_a

It is not allowed to declare a variable of same structure type but it is allowed to declare a pointer. For example, [code] struct node { int a; struct node x; //not allowed struct node *pnext; //allowed }; [/code] My question is when we can declare a pointer of same …

Member Avatar for Iqbal_h_a
1
190