User Profile

Collapse

Profile Sidebar

Collapse
seforo
seforo
Last Activity: Nov 28 '08, 01:02 PM
Joined: Nov 16 '06
Location: South Africa
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • seforo
    replied to Explanation on preprocessor directive
    in C
    He used apostrophes, I just did copy and paste. Thanks for the explanation, it highlighted me a lot.
    See more | Go to post

    Leave a comment:


  • seforo
    started a topic Explanation on preprocessor directive
    in C

    Explanation on preprocessor directive

    Can someone explain for me what this guy is doing here. N.B homer_uint64 is a defined data type

    #define CLUSTERS_DATAID ((homer_uint64) 'CLUS' << 32 | (homer_uint64)' TERS')
    See more | Go to post

  • seforo
    started a topic Problem understanding a line in a code
    in C

    Problem understanding a line in a code

    Hello Team,

    I extracted this line from a code and I have problems understanding it. I dont understand the use of ' ' and of << on this line. Can someone explain to me.

    #define CLUSTERS_DATAID ((homer_uint64) 'CLUS' << 32 | (homer_uint64)' TERS')
    See more | Go to post

  • seforo
    replied to Problem with my c assignment
    in C
    So .....? Where is the problem? What have you done?
    See more | Go to post

    Leave a comment:


  • seforo
    replied to shadowing a parameter
    in C
    Any function that is defined below the main function should have its function prototype declared before the main function. Otherwise you should define (or write) all your functions before defining main function.
    See more | Go to post

    Leave a comment:


  • seforo
    replied to Can't get this program to compile
    in C
    Obvious error:
    Firstly you forgot to put the return type of binomial; you should do this

    int binomial(int n, int k)
    {
    //your function goes here
    }

    Secondly, the return type of binomial is integer so this statement
    if (n < k)
    return("Error") ;
    }
    is wrong. you should return a number not "Error"

    Others then should be logical...
    See more | Go to post

    Leave a comment:


  • seforo
    replied to Error pthread_id_np_t undeclared
    in C
    First of all I know how to use pthread_t and I want to know why the compiler does not recognize pthread_id_np_t .
    Secondly there is some import behavior I want to observe from that code and reuse it. I don't have to reinvent the wheel.
    Thirdly posix thread are compiled with -pthread (http://www.llnl.gov/computing/tutorials/pthreads/)
    See more | Go to post

    Leave a comment:


  • seforo
    started a topic Error pthread_id_np_t undeclared
    in C

    Error pthread_id_np_t undeclared

    Dear team,

    I am using posix thread and I downloaded example that I want to test. However the compile complains that:
    `pthread_id_np_ t' was not declared in this scope

    I have done:
    #include <pthread.h>
    and I compile as follow:

    g++ -pthread example.cxx

    How I can solve this problem?
    See more | Go to post

  • seforo
    started a topic Waking up a POSIX thread with a signal
    in C

    Waking up a POSIX thread with a signal

    Hi Guys,

    I am very new to pthreads. I have two pthreads, the writer and the reader thread. I want to be able to wake up the reader thread with SIGUSR1 after writing to the stack.

    CAN YOU PLEASE GIVE ME SOME LINKS I CAN READ ABOUT HOW TO DO THIS OR ANY LINKS TO PREVIOUS POSTS THAT DISCUSS THIS. ANY HELP WILL BE APPRECIATED.
    See more | Go to post

  • seforo
    replied to _mkdir question
    in C
    What is make _mkdir? Or you want to use mkdir command of linux? Then you should consider using the function system()
    See more | Go to post

    Leave a comment:


  • seforo
    started a topic Compiling error
    in C

    Compiling error

    Hi guys,
    I have a class declared and defined in AliHLTMessageQu eue.h and AliHLTMessageQu eue.cxx respectively

    template<typena me MessageType, int kSignalNumber = SIGUSR1>
    class AliHLTMessageQu eue{.//declarations etc..}

    I also have a file queueTest.cxx where i call AliHLTMessageQu eue methods.
    I declare my object like as:
    AliHLTMessageQu eue<int> queue(20000000) ;
    And I made...
    See more | Go to post
    Last edited by seforo; Nov 20 '07, 01:30 PM. Reason: I left important information

  • seforo
    started a topic Constant pointer error
    in C

    Constant pointer error

    Hi Guys,

    I have have a class called person and it has a method called say() and this is how I declare its object:
    [CODE=c++]
    const person * a;
    a->say();
    [/CODE]
    This peace code gives me this error:
    error: passing ‘const person’ as ‘this’ argument of ‘void person::say()’ discards qualifiers

    I DON'T SEE WHY THIS IS WRONG, CAN YOU PLEASE HELP.
    See more | Go to post

  • seforo
    started a topic grep

    grep

    Hi Guys,

    I am using using grep to look for certain patterns in files and it can't give me the output I want. I know that the pattern,

    TMatrixT<double >::Determinant( ) Const

    is there in the file I am searching but grep can't find it. How I should I pass this pattern to grep, i.e which options to use. I tried several options, it does not work
    See more | Go to post

  • seforo
    started a topic hidden characters in a string

    hidden characters in a string

    Hi Guys,

    I am reading a file (say file1) to extract strings and use them to search the lines in file2 that contain them. I get an error that the strings are not there in file2 but I know that they are there. When I just use grep on the command line and type the string of an interest and file2 as an input file I get the corresponding line.

    I HAVE A FEELING THAT PYTHON IS INSERTING EXTRACT HIDDEN CHARACTERS WHILE READING...
    See more | Go to post

  • seforo
    started a topic Symbol defination
    in C

    Symbol defination

    Hi Guys,

    What is actual meaning of the term symbol in the context of computer programming or computer science. E.g sometimes one gets compile error like "Undefined external symbol main", and it is also said that the nm command in linux list symbols from object files.
    See more | Go to post

  • seforo
    replied to Intializing the method's parameter list
    in C
    Thank you, it works now...
    See more | Go to post

    Leave a comment:


  • seforo
    replied to Intializing the method's parameter list
    in C
    Let me be specific; The following piece of code does not compile:
    [CODE=cpp]
    #include <iostream>
    using namespace std;
    class Test
    {
    public:
    Test(char * file = "galice.roo t");
    void Show()
    {
    }
    };
    ...
    See more | Go to post

    Leave a comment:


  • seforo
    started a topic Intializing the method's parameter list
    in C

    Intializing the method's parameter list

    Hi Guys,

    What is the advantage of intializing the parameter list of the method, e.g
    [CODE=c++]
    class ReadFile
    {
    ReadFile(const char* filename = "Mystuff.tx t")
    {
    // Function defination goes here
    }
    // Define the rest of the class here
    }
    [/CODE]

    I am asking this because having that I still have to pass the file name...
    See more | Go to post

  • seforo
    replied to Going Crazy Over Program
    in C
    Learn a proper use of while loop, also learn who to use break and continue statements. I have modified your code alittle bit
    [CODE=c++]
    cout << "Enter a number greater than 10: ";
    while (true) {
    cin >> integer;
    if(integer==10)
    {
    cout << "That number is equal to ten" << endl;
    cout << "Enter a number greater than...
    See more | Go to post

    Leave a comment:


  • seforo
    replied to Going Crazy Over Program
    in C
    where do you get stuck? Read posting guidelines for this site please
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...