Search:

Type: Posts; User: nishkarsh

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    2,486

    I implemented the second in my code and it didn't...

    I implemented the second in my code and it didn't work...
    I replaced it with first and it works fine....
  2. Replies
    6
    Views
    2,486

    Puzzling pointers...

    Whats the difference between



    void swap(int* a,int* b)
    {
    int x=*a,y=*b;
    x=x+y;
    y=x-y;
    x=x-y;
  3. Replies
    4
    Views
    2,509

    Vector class -STL lib

    I am new with vectors and STL library. please tell where I'm going wrong?



    int t,i;
    char ch;
    char arr[400];
    vector<char> exp;
    stack<char> s;
  4. Replies
    17
    Views
    4,700

    here's the code ... #define SIZE_MAX 100...

    here's the code



    ...
    #define SIZE_MAX 100

    typedef struct stack {
    char data[SIZE_MAX];
    int size;
  5. Replies
    17
    Views
    4,700

    MALLOC function usage prob

    How is my usage of malloc wrong??



    typedef struct stack {
    char data[SIZE_MAX]; // SIZE_MAX #defined as 100
    int size;
    } stack;

    stack *s=(stack*)malloc(sizeof(stack)); //line# 11
  6. Replies
    10
    Views
    3,517

    Here's a part of the add_token() function. (The...

    Here's a part of the add_token() function. (The part that I've truncated is a few if-else statements that recognize tokens and add them to a linked list)



    void add_token() {

    struct lex...
  7. Replies
    10
    Views
    3,517

    Following Salem's advice, I added a breakpoint...

    Following Salem's advice, I added a breakpoint and stepied....

    This is what happens




    This goes on for some time but I think "that '??' cant be good"
    Am I right?
  8. Replies
    10
    Views
    3,517

    This is what bt gives me... > Program...

    This is what bt gives me...


    > Program received signal SIGSEGV, Segmentation fault.
    > 0x080487be in add_token ()
    > Current language: auto; currently asm
    > (gdb) bt
    > #0 0x080487be in...
  9. Replies
    10
    Views
    3,517

    gdb reports something I dont understand

    could you please explain what has happened here?

    > Program received signal SIGSEGV, Segmentation fault.
    > 0x0804885d in add_token ()
    > Current language: auto; currently asm
  10. Replies
    12
    Views
    1,766

    to compile multiple files you can write a shell...

    to compile multiple files you can write a shell script which includes complation statements for all files...
  11. Replies
    4
    Views
    6,862

    Are there any libraries in C for building lexical...

    Are there any libraries in C for building lexical analyzers/scanners?
  12. Replies
    4
    Views
    6,862

    Lexical analyzer for C

    I am planning to design a Lexical Analyzer for C language for a project.

    how difficult is it?
    how difficult is it to design it 'in' C itself?

    what are the things that I need to know?
  13. Replies
    4
    Views
    3,095

    its working now thanks ppl

    its working now
    thanks ppl
  14. Replies
    4
    Views
    3,095

    Thx for your reply... I've made the changes u...

    Thx for your reply...
    I've made the changes u suggested... but the prob still persists...

    the modified code is;



    #include <stdio.h>

    int main() {
  15. Replies
    4
    Views
    3,095

    Text File Handling - seg fault

    The code below to append a file is giving segmentation fault...
    It takes the input but doesnt print DONE..
    Plz help me out...



    #include <stdio.h>

    main() {
    char * ptr;
Results 1 to 15 of 16