Search:

Type: Posts; User: greg677

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    7,689

    yeah i suppose, just not sure this might work,...

    yeah i suppose, just not sure this might work, for the binary file that's another program, i'll create so it just opens the binary file to display the information.



    #include<stdlib.h>...
  2. Replies
    2
    Views
    7,689

    reading and writing to a binary file

    Hey people, i've followed the tutorial on how to do file I/O to binary files however i need one more line, but im not sure what to type in :(

    its supposed to open the binary file binFile for...
  3. lol fatal error i presume, yahr i tried to run it...

    lol fatal error i presume, yahr i tried to run it and i get a seg fault :(
  4. Load a file into a structure and output it to a screen

    I am trying to find a way to load my file into a series of structures and then display the results out onto the screen but i seem to hit the infinite loop as the files isnt actually being read, any...
  5. Replies
    3
    Views
    1,146

    How to use Macros??

    Hey peoples im new to macros and i have seem to have gotten the notation for my VOLUME macro, however i dont know what to do for the PRINTSTR macro which is supposed to ask a string for you to input...
  6. Replies
    11
    Views
    6,433

    Like the following? int main() { int...

    Like the following?



    int main()
    {
    int *integersArray;
    int numInput;
    int i;
  7. Replies
    11
    Views
    6,433

    @ adak your above solution does not even output...

    @ adak your above solution does not even output anything, hmm i tried messing with the program, but still i seg fault, at one point it ran an infinte loop. when it was generating the integers :(
  8. ok managed to get it working, but the unnecessary...

    ok managed to get it working, but the unnecessary lines are still showing, how can i only display the ones that have the word i searched for? thanks for the help so far.
  9. yes, i see what you mean, but its (my fault from...

    yes, i see what you mean, but its (my fault from not telling you at first post) supposed to search for the word "peter" and in the .txt file thier is one called "PetER" now the program goes to the...
  10. Search for case insensensitive strings within a .txt file

    I mostly have this program completed but there is one problem i cannot figure out, this programs asks the user to search for a word, next the user is asked which file to open, then the program is to...
  11. Replies
    11
    Views
    6,433

    well i tried the above code, but this time i get...

    well i tried the above code, but this time i get an infinite loop of zeros if i enter 1 integer and store number 1 into the integer, however if i select 2 integers and put numbers within them i get a...
  12. Replies
    11
    Views
    6,433

    Passing array back to main function

    Hello people :) i'm having problems with my program, what its supposed to do is ask the user how many integers to store, then for every integer it asks the user to store a number at the integer...
  13. awesome! thanks for the help

    awesome! thanks for the help
  14. ok then but ow would you store result? since you...

    ok then but ow would you store result? since you cannot have any interaction with it, i tried using a scanf but that's just assigning an int to result and then throwing out the number of result with...
  15. Pointer to functions, program adding two numbers

    Hey peoples, this program is supposed to add two numbers n1 and n2 and output it to res



    #include <stdio.h>
    #include <stlib.h>

    int addNumbers(int n1, int n2, int res);

    int main(void)
  16. Thread: File I/O, help

    by greg677
    Replies
    4
    Views
    1,136

    i have attempted the following, and it does ask...

    i have attempted the following, and it does ask the user to input a path for the file, however when the program runs it always says "cannot open the file selected", i am trying to open "u:\input.txt"...
  17. Thread: File I/O, help

    by greg677
    Replies
    4
    Views
    1,136

    File I/O, help

    Hey guys need help on opening a file in c. i know how to open a file using a hardcoded path

    for example: "C:\Program Files\input.txt"
    but i want to be able to type any path and then c searches...
  18. Replies
    12
    Views
    5,916

    i've managed to do the first three bits of code,...

    i've managed to do the first three bits of code, however the last two we actually haven't learnt yet, i could try one way, but that would be way too time consuming, manually putting 500 intArray...
  19. Replies
    12
    Views
    5,916

    ahh silly me, thank you so much rogster001 for...

    ahh silly me, thank you so much rogster001 for describing more clearly it helped a lot. one more question i do not know how to display the rest of the elements onto the screen i only know how to...
  20. Replies
    12
    Views
    5,916

    This program is supposed to ask for an integer...

    This program is supposed to ask for an integer off the user between 3 to 1000, then the array will generate that amount of numbers which has been asked by the user, so (numInts >= 3) && (numInts <=...
  21. Replies
    12
    Views
    5,916

    oh ok then thank you, now i have followed your...

    oh ok then thank you, now i have followed your instruction, i am using the program called putty and i generate a "segmentation fault" error what does this mean??
  22. Replies
    12
    Views
    5,916

    sorry :( i have no clue what you are saying,i...

    sorry :( i have no clue what you are saying,i might as well classify myself as a complete beginner. :)
  23. Replies
    12
    Views
    5,916

    Beginner in C programming (arrays)

    Hey guys i am new to C programming and im trying to learn how to display elements within arrays, and heres an example of the code.



    #include<stdio.h>

    int main() {

    int numInts;
    int i;
Results 1 to 23 of 23