Search:

Type: Posts; User: torquemada

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,041

    thanks how didn't I see that before?

    thanks
    how didn't I see that before?
  2. Replies
    2
    Views
    1,041

    reading data from text file

    I'm writing this program where I write data to s file and the read it from it. Here is my code:


    #include<iostream>
    #include<string>
    #include<iomanip>
    #include<fstream> //for using files
    ...
  3. Replies
    10
    Views
    1,844

    well, that sounds easier but it's not the point...

    well, that sounds easier but it's not the point of the assignment.
    I have to be able to return an array of structures. can you tell me where is my main error in the search function?

    thanks
  4. Replies
    10
    Views
    1,844

    thanks, So I'm able to enter the data now. ...

    thanks,

    So I'm able to enter the data now.

    I pass that structure returned to another structure in main(), the I pass that information to another function. The user has to look up a book based...
  5. Replies
    10
    Views
    1,844

    I found my mistake I was using %c instead of %s...

    I found my mistake
    I was using %c instead of %s
    that's what gave me the error
    thanks though
  6. Replies
    10
    Views
    1,844

    the declaration of the structure. I declared it...

    the declaration of the structure.
    I declared it global, sorry I didn't include it up there.
    I moved it inside my function but I get the same error
  7. Replies
    10
    Views
    1,844

    Thanks, I was able to fix that issue but now I...

    Thanks, I was able to fix that issue but now I have a run-time error. Every time I run it, it doesn't work.
    Also about entering titles with spaces, I don't have to do that as the title should only...
  8. Replies
    10
    Views
    1,844

    working with structures

    I'm writing a program that asks the user to enter information about a book or series of books (title, author, year, version and price) which are store inside a structure. So this is my structure

    ...
  9. I'm just trying to understand how **array works....

    I'm just trying to understand how **array works. Can you give me an example on how you would use **array to access the data in the array, or input data into the array?
  10. can anybody give me an example on a double pointer array?

    lets say I have **array[x][y];
    where x and y are other pointers *x and *y.
    if that's possible. I want to know how I would use a double pointer array to access the values in it or to pass them to...
  11. Replies
    9
    Views
    1,148

    hmm, I'm still kind of confused. The reason why I...

    hmm, I'm still kind of confused. The reason why I asked is because I saw those different types of coding on the book I'm using and some other examples from a professor. Maybe I just took the wrong...
  12. Replies
    9
    Views
    1,148

    help with pointers

    I have a hard time understanding pointers in C. can anybody explain me how these operations differ?

    int num = 3;
    int *ptr;

    ptr = &num;
    ptr = num;
    ptr = *num;

    I just started doing pointers...
  13. Replies
    28
    Views
    2,834

    Sorry for the late reply. I just wanted to say...

    Sorry for the late reply.
    I just wanted to say thanks to every one for their time ;)

    I figured something out
    Instead of letting 'i' be my counter I created another variable "counter" to count...
  14. Replies
    28
    Views
    2,834

    I tried it but the problem is that it won't let...

    I tried it but the problem is that it won't let me enter numbers pass 2. It might not be the best implementation.




    for(i = 0; i < 10; i++){
    for(j = 0; j<cols; j++){
    ...
  15. Replies
    28
    Views
    2,834

    ok, the problem is stopping the 'i' from going...

    ok, the problem is stopping the 'i' from going all the way to ten. I tried breaks in different places. If I put it within just the 'i' for loop, it won't let me enter enough numbers.
    I put a printf...
  16. Replies
    28
    Views
    2,834

    Well, nope. If I were waiting just for the code I...

    Well, nope. If I were waiting just for the code I would have just asked for it since the beginning. But that's no the point if I won't learn programming >_> newbie



    Yes I have, I tried...
  17. Replies
    28
    Views
    2,834

    matrix[10][10]={0}; //initial declaration of my...

    matrix[10][10]={0}; //initial declaration of my matrix
    int x = 'x';

    for(i = 0; i <10; i++){
    for(j = 0; j<cols; j++){
    scanf("%d", &matrix[i][j]);
    if(matrix[i][j] == x)
    ...
  18. Replies
    28
    Views
    2,834

    Ok, I see many suggestions. I tried putting a...

    Ok, I see many suggestions. I tried putting a break just for the 'i' counter but it didn't work. What I want is just to stop the i from going all the way to 10. I can't define it as other number...
  19. Replies
    28
    Views
    2,834

    break in for loop not working

    I previously asked this on another thread but no one replied. My question is how to stop a for loop. I have a for loop with counter 'i' with a maximum of 10. Then I have an inner for loop with...
  20. I have some code but I still have a problem with...

    I have some code but I still have a problem with it
    this is the part of my code for entering the numbers and calculating the rows




    for(i = 0; i <10; i++){ //10 is the maximum number...
  21. I have some code but I still have a problem with...

    I have some code but I still have a problem with it
    this is my code




    for(i = 0; i <10; i++){ //10 is the maximum number of rows, since rows are not specified I'm using 10
    ...
  22. I was working on my program and found a mistake...

    I was working on my program and found a mistake with the code to fins the number of rows.

    The code checks if the number is divisible by 2 and makes the rows equals to the number of items divided...
  23. Thanks everyone iMalc> yes I know I have to...

    Thanks everyone

    iMalc> yes I know I have to check for errors. I'm planning on putting a break after the data entry to check if the input is not a number then the program will stop.

    Adak, that's...
  24. Thanks, but my main question is how to set up the...

    Thanks, but my main question is how to set up the rows after the number of columns has been defined and the values have been entered
  25. how to get rows in a matrix when only columns are given

    The program starts with a matrix with a maximum dimensions of 10 by 10. I have to ask the user to input the number of columns he would like the matrix to be. Once he enters that data he has to enter...
Results 1 to 25 of 39
Page 1 of 2 1 2