Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. yogesh77

    how to convert C++ class in to C struct ??

    anand having function pointers inside struct is of no use because unnecessarily you are increasing the size of struct and it serves no purpose because other than calling the function in other way around you achive nothing using function ptrs inside struct in c in cpp public and private are...
  2. yogesh77

    Curses on unix :)

    friend i also tried curses but there is some problem with the header and library in solaris forte c++ if you want to clear the screan using unix utility do this #include<stdlib.h> main() { system(&quot;clear&quot;);//this clears the screan //your code } see if it helps
  3. yogesh77

    mapping C++ virtual function to corresponding C function

    anand , i have already in my previous reply suggested that there is no equivalent of c++ virtual functions in c .reason c has only compile time binding while cpp apart from compile time binding has run time binding implemented by VTABLE AND VPTRS . so for your task write different functions for...
  4. yogesh77

    how to convert C++ class in to C struct ??

    this is a rough template which i think would give you some idea ,remember you can write fns inside a struct but in standard c program you shouldnot other thing is concept of virtual function is not appicable in c for in c there is always early binding last thing whenever you call a function...
  5. yogesh77

    Making a MP3 player with DJGPP,text file to array problem, please help

    bluenote, first the reason of error its because of array index out of bound ,you started from index 1 use index o to start and the problem finishes second the programme which you wrote is excellent to start with but to solve Mac's problem you have to allocate two blocks of memory from heap...
  6. yogesh77

    Question about Strings

    kaotic try this and let me know if its ok fprintf(writefile1, &quot;%-5d%-15s%-35s\n&quot;, id, botanical, common); change the no as required let me know if it helped yogesh
  7. yogesh77

    Question about Strings

    kaotic use /t for a tab /b for a single blank reply if it helped yogesh
  8. yogesh77

    Question about Strings

    yes kaotic there is a problem there what has happened is the entire expression of your if is evaluated due to braces and even if one file is successfully opened the result is true so open the file individually and check with the condition or if you want in a single line change as you have...
  9. yogesh77

    Question about Strings

    kaotic, there is absolutely no problem in this part of your code and there is no segmentation fault in this part it may be a a minor compile time fault depending upon you compiler but that has to do with the line seperator there may be segmentation fault in other parts this part of your...
  10. yogesh77

    URGENT - URGENT

    hello mgayan, ankan's programme is excellent , another alternative ,see if it helps #include<stdio.h> #include<string.h> #include<malloc.h> char* funcReorder(char *ptr) { char *p=ptr; while(1){ if(*p==' ' || *p=='\0') break; p++; } *p='\0'; return ptr; } main() { const char*...
  11. yogesh77

    Making a MP3 player with DJGPP,text file to array problem, please help

    friend this is what you want ,compile it and enjoy this is one way with arrays but it can be done more efficiently with dynamic allocation but this is ok #include <stdio.h> #include <string.h> #define MAXLIN 250 #define MAXLINE 250 //this refers to the max line you //have...
  12. yogesh77

    code segment data segment

    i am sorry the above message was meant for other forum i am sincerely sorry
  13. yogesh77

    code segment data segment

    i think you have expained clearly
  14. yogesh77

    Segmentation fault (core dumped)

    i agree with lim ,i would just add onething more when you are trying to access memory without improperly you get core dumped .its a way that the operating system doesnot lets you get unauthorised access to a memory segment you will get this with array,strings and anthing which deals with...
  15. yogesh77

    code segment data segment

    LIM, in unix the basic architecture is as i said before correct me if its wrong we are given a process area this area has four parts 1.the code segment which doesnot change 2.the data segment which has two parts a.initialized data b.uninitialized 3.stack segment which is at the top of the...
  16. yogesh77

    code segment data segment

    friends i asked you about this and after finding the things manually i conclude 1.all global stored in data segment 2.all locals and func parameteres stored in stack segment 3.function static or otherwise stored in code segment (it may be called the initialized data segment which may be...
  17. yogesh77

    datasegment stacksegment and C/c++ variables

    all gurus i am totally confused with the storage in c/c++ where is ptr variable,static variable etc be stored with respect to datasegment and stack segment .please clear my doubts
  18. yogesh77

    how to use int (*p)[3]

    what is int (*p)[3] and what is it

Part and Inventory Search

Back
Top