Search:

Type: Posts; User: greendragons

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,977

    Thnx! it solved my problem... :wink:

    Thnx! it solved my problem... :wink:
  2. Replies
    2
    Views
    1,977

    scanf behaving abnormally

    Hello,
    I am writing a program in which user enters number of coordinates and then coordinate values, and then it enters number of queries and then queries, here is the partial code..


    ...
  3. Replies
    21
    Views
    2,843

    nah it's working fine for positive values too......

    nah it's working fine for positive values too... :D
  4. Replies
    21
    Views
    2,843

    Im writing a program where efficiency is very...

    Im writing a program where efficiency is very important as im dealing with large numbers, so branching will lead to slow running time, and here comes the bit hack to rescue, mine long long abs works...
  5. Replies
    21
    Views
    2,843

    Get absolute value efficiently

    Hello everyone,
    I was searching for a way to get absolute value efficiently using bit level hacks, n found it's int equivalent, but i wanted it on long long so changed int to long long,

    ...
  6. Replies
    5
    Views
    5,935

    Actually im following a tutorial of ncurses, not...

    Actually im following a tutorial of ncurses, not sure about conio.h, all i now it's clrscr() and getchar()(guess im right).. :D
  7. Replies
    3
    Views
    2,780

    const char** is for constant pointer to a pointer...

    const char** is for constant pointer to a pointer which is of type char data, means that you cannot change values of array a, and btw %s is printing fine...
  8. Why don't you use switch case for that, you can...

    Why don't you use switch case for that, you can create a seperate function with switch case which checks for those cards and prints equivalent characters....
  9. Replies
    5
    Views
    5,935

    I know eof is int, it's just macro for int value,...

    I know eof is int, it's just macro for int value, what im trying to achieve that i get every character of different(random) color..
  10. What you are looking for is provided in C99 and...

    What you are looking for is provided in C99 and C++, as C89 it is strictly static and array dimensions must be known at compile time...
  11. Replies
    5
    Views
    5,935

    Change color per Character ncurses

    Hello,
    I am writing a program that reads a file and prints each character of a file in different randomly chosen color. I am using ncurses for that,
    But the problem is that i cannot change color...
  12. Replies
    8
    Views
    2,550

    Thnx alot!! i didn't know that.... :)

    Thnx alot!! i didn't know that.... :)
  13. Replies
    8
    Views
    2,550

    Yes your right it should be strcpy... can u...

    Yes your right it should be strcpy... can u please explain me why i dnt need to cast return poiner of malloc as i have been doing it in lot of programs... wht is wrong with it..
    I know we don't...
  14. Replies
    8
    Views
    2,550

    gosh!! how can i miss that.. thnx alot rags.... :)

    gosh!! how can i miss that.. thnx alot rags.... :)
  15. Replies
    8
    Views
    2,550

    here are the header file #include...

    here are the header file
    #include<my_global.h>
    #include<mysql.h>
    #include<stdlib.h>
    #include<string.h>

    I think the malloc cast is fine as it returns void * and i need to operate on char *...
  16. Replies
    8
    Views
    2,550

    Undeclared Variable Error

    Hello,
    I am writing a query for database
    here is the code..


    char *create_query(char *name, int perc)
    43 {
    44 char *defl = "INSERT INTO student_profile VALUES ('";
    45 char *def2 =...
  17. Replies
    5
    Views
    1,869

    You are not getting wht i said... i know size of...

    You are not getting wht i said... i know size of char * is dependent on architecture.... im here swapping addresses pointed by vp1 and vp2 in case of char string... so i need to pass char ** which...
  18. Replies
    5
    Views
    1,869

    I got it.. i missed &.... it should be...

    I got it.. i missed &.... it should be swap(&s1,&s2, sizeof(char *)) and it's working fine... as memcpy operates on data pointed to by address.. so for char string i must pass char **...
    And that...
  19. Replies
    5
    Views
    1,869

    Problem With Swapping

    Hello,
    I have written a code to swap two variables of generic types....
    I am able to swap numeric values correctly... but when i try to work with character arrays it is swapping but some characters...
  20. Replies
    2
    Views
    1,892

    LOL... i forgot tht sorry.... Now it's working.....

    LOL... i forgot tht sorry....
    Now it's working.. Thnx!!
  21. Replies
    2
    Views
    1,892

    Linked List Program Error

    Hello,
    I am writing a simple linked list implementation program... But im facing a problem in printing the contents of list, here is the code..


    #include<stdio.h>

    void insert(int value); ...
Results 1 to 21 of 21