Search:

Type: Posts; User: ozgulker

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds; generated 50 minute(s) ago.

  1. Replies
    0
    Views
    2,401

    Cross Compiling with Linux and Turbo C

    I have a C file that will be cross compiled in both Linux and Turbo C. It has segments of codes specific to each platform. I know that I will use #ifdef's, #define's to control which part will be...
  2. Replies
    4
    Views
    2,175

    Poll: PHP vs ASP.NET

    PHP or ASP.NET?
  3. Thread: Super Bowl

    by ozgulker
    Replies
    50
    Views
    8,066

    Poll: Rams are by far the most powerful team and they...

    Rams are by far the most powerful team and they will crush Patriots before they know what hit them.

    For me, those in damned cable TV network cancelled the channel (FOX-Sports) which broadcasts...
  4. Replies
    3
    Views
    1,502

    Try this Time::Time( int hr, int min, int sec,...

    Try this

    Time::Time( int hr, int min, int sec, int bmonth, int bday, int byear)
    : birthDate( bmonth, bday, byear )
    {
    setTime( hr, min, sec );
    }
  5. Thread: Favorite GUI

    by ozgulker
    Replies
    13
    Views
    1,778

    Well, if you are writing code just a couple of...

    Well, if you are writing code just a couple of pages, yes you may not need an IDE. However when your code becomes dozens of pages and if you are programming in a multi user system, then no simple...
  6. Replies
    1
    Views
    4,515

    Machine independence of C is that you compile the...

    Machine independence of C is that you compile the same source code in different machines and get different assembler code specific to that type of machine.
    So your source code is the same....
  7. Replies
    13
    Views
    2,363

    < third party ones. Nearly all of the...

    < third party ones.

    Nearly all of the components of Linux are third party ones. So as long as you write for KDE or GNOME, you don't need to worry about it.
  8. Replies
    2
    Views
    2,565

    You use fork() and execve(and its derivatives) to...

    You use fork() and execve(and its derivatives) to run a program within a program.
    Fork creates a copy of the current process and you overwrite the content of the child by an execve call.


    [CODE]...
  9. Replies
    3
    Views
    1,761

    Apart from what gunfinguy4 has pointed, I see...

    Apart from what gunfinguy4 has pointed, I see that your t is not initalized to anything. Also you don't seem to increment t in the while loop either.
  10. Replies
    24
    Views
    4,241

    I actually hate excessive use of preprocessor. I...

    I actually hate excessive use of preprocessor. I was looking at the source of linux kernel and saw stuff like that

    in file zz.h
    #include xx.h
    #define _status (x) >> 1


    in file xx.h
    #define...
  11. Replies
    24
    Views
    4,241

    Things you hate in C/C++

    Hey guys, I want to know the features you are most annoyed in C/C++. (apart from segmentation faults) :)
    I await your feedback.
  12. Thread: using free()

    by ozgulker
    Replies
    3
    Views
    1,169

    Are you sure you are freeing the correct element?...

    Are you sure you are freeing the correct element? You have to free the deleted nodes because you want to claim the memory allocated to them. If you don't free the deleted elements, you will leak out...
  13. Thread: pointers

    by ozgulker
    Replies
    3
    Views
    1,296

    use strcpy to allocate a string from another; ...

    use strcpy to allocate a string from another;

    char *str1 = "something";
    char *str2;

    int size = strlen(str1) + 1;
    str2 = (char*) malloc(size);
    strcpy(str2, str1);

    By the way, do you want...
  14. Thread: Mystery.

    by ozgulker
    Replies
    1
    Views
    2,652

    It counts the occurences of 1's in the binary...

    It counts the occurences of 1's in the binary equývalent of an unsigned integer and returns 1 if the total number of 1's is odd, 0 for even.
  15. Replies
    3
    Views
    6,190

    Sources are usually compiled into library files...

    Sources are usually compiled into library files (.lib) in commercial compilers and distrubuted with their headers so you cannot read the source.

    However you may try yo search for an open source...
  16. Replies
    9
    Views
    1,919

    I am not sure whether fflush(stdin) is defined or...

    I am not sure whether fflush(stdin) is defined or undefined but I have used this hundreds of times in various compilers (with exception of gcc) and it is working. Is being undefined (if really)more...
  17. Thread: quicksort

    by ozgulker
    Replies
    1
    Views
    1,089

    I have corrected the mistakes and marked them on...

    I have corrected the mistakes and marked them on your code.
  18. Replies
    9
    Views
    1,919

    add fflush(stdin); after the scanfs. #include...

    add fflush(stdin); after the scanfs.

    #include <stdio.h>
    main ()
    {
    char ans;

    do
    {
    int num1, num2, num3;
  19. Thread: string search

    by ozgulker
    Replies
    3
    Views
    1,155

    Use strstr

    Use strstr
  20. Replies
    23
    Views
    6,753

    int palindrome(char string[], int size) { ...

    int palindrome(char string[], int size)
    {
    if (size == 0 || size == 1)
    return 1;
    else if (string[0] != string[size - 1])
    return 0;
    else
    ...
  21. Replies
    5
    Views
    3,579

    Well, in some compilers, not including header...

    Well, in some compilers, not including header files sometimes works for frequently used functions. But always include the necessary header files as a good programming practice.
  22. Replies
    4
    Views
    11,329

    atoi converts character strings only (whether you...

    atoi converts character strings only (whether you create strings with arrays or pointers, does not matter). It is seen from the prototype.

    Are you trying to convert a single character to integer...
  23. Replies
    3
    Views
    2,385

    Flushing cin buffer.

    Does anyone know how to flush the input buffer in C++? I was able to do it in C by fflush(stdin) in C I/O, but I could not find its counterpart in C++. I am using a lot of input operations in my file...
  24. Replies
    4
    Views
    11,329

    #include #include using...

    #include <cstdlib>
    #include <iostream>

    using namespace std;

    main()
    {
    int val;
    long val2;
    char *string = "1234567";
  25. Thread: inheritance

    by ozgulker
    Replies
    2
    Views
    1,055

    Yes, you can do this. Indeed this type of...

    Yes, you can do this. Indeed this type of operations is the heart
    of polymorphism. You can find a lot of detailed information in the Internet or in C++ books about polymorphism also.
Results 1 to 25 of 65
Page 1 of 3 1 2 3