User Profile

Collapse

Profile Sidebar

Collapse
DOOO
DOOO
Last Activity: Mar 28 '08, 06:16 PM
Joined: Mar 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • DOOO
    replied to pointer problem
    in C
    i am try to avoid this error but still have a problem

    Code:
    #include <list>
    #include<iostream>
    #include <algorithm>
    
    using namespace std;
    
    void sort(double* begin,double* end)
    
    {  
    
    for(int j=0;j<(end-begin)+1;j++)
    {
     	for(int i=0;i<(end-begin)+1;i++)
    	{
    		if(*(begin+i)>*(end-i))
    		{
    ...
    See more | Go to post
    Last edited by Banfa; Mar 28 '08, 05:27 PM. Reason: Added the missing Es

    Leave a comment:


  • DOOO
    replied to pointer problem
    in C
    [QUOTE=Banfa]Not really, your program contains no arrays. It contains a pointer you appear to be using a bit like an array but that is all.

    Do you mean you are getting a SegFault/Memory Access Exception?[/QUO

    DAMGE:after normal block (#45)at 0x00491d20

    that is the error ,i can't understand it
    See more | Go to post

    Leave a comment:


  • DOOO
    replied to pointer problem
    in C
    actually i have a quite good knowledge about sorting algorithms (merg,heap,bubb le ,...etc) but my program aimed to sort an array using pointer it is an application on pointer not on sorting algorithm and the problem is when i enter array to be sorted the program give me address in the memory . is it clear now?...
    See more | Go to post

    Leave a comment:


  • DOOO
    replied to pointer problem
    in C
    yup it is a task i asked to do it...
    See more | Go to post

    Leave a comment:


  • DOOO
    started a topic pointer problem
    in C

    pointer problem

    hello

    I have an error in my cod which is trying to sort an arry using pointer i'd be grateful if any one help me to solve my problem and here is my code

    [CODE=cpp]/*************** *************** *************** *************** *************** ******/

    #include <list>
    #include<iostre am>
    #include <algorithm>

    using namespace std;

    //////////////////////////////////////////...
    See more | Go to post
    Last edited by Ganon11; Mar 27 '08, 08:50 PM. Reason: Please use the [CODE] tags provided.
No activity results to display
Show More
Working...