• Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in C Programming Priority queue questions

    To continue... new->info = item; new->priority = itprio; > The arrow is being used because new is a pointer right? Yes. The 'arrow' is the member indirection operator; it allows …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Recursion function find prime number

    //Hi all,can you explain how to call this function in main. //i ask user to enter the number,like this is it correct in main,recursevely call function? bool isPrime(int n, int …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Recursion function find prime number

    You would need to call `isPrime()` with two numbers, one the number you are checking and the other a number smaller than that but larger than it's square root. I …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching C Programming Priority queue questions

    I was reading this example of Priority queues and have several questions. http://matrixsust.blogspot.com/2011/11/basic-priority-queue-in-c.html #include<stdio.h> #include<malloc.h> void insert(); void del(); void display(); //How exactly do structs in structs work? Do you …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in C Programming Priority queue questions

    > How exactly do structs in structs work? Do you need to do anything special with them? What do you mean by 'special'? What you would do woith them would …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 2

    I see you've changed to a different type of `for()` loop, which also changes how data is accessed. Change the references inside the loop back from `products[model]` to just `product`, …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching default constructor values

    In the following program, where is pt1 getting it's values (1, 0)? I get pt3's values (5, 10) because I can see them in the code. #include <iostream> using namespace …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in default constructor values

    Most likely, these are just the values that happen to be in those memory addresses when the prgoram starts.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in c programming casting struct values

    Were you able to solve the issue?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Hex display!

    OK, first thing is, in C you can only declare variables at the beginning of the function, so I'm not sure why it is letting you put it there. The …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Hex display!

    Which part are you having trouble with?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Please help me i am in a exam

    How many times is the inner loop body executed in the following nested loop? for (int x =1; x <= 10; x++) for (int y = 1; y <= 10; …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Please help me i am in a exam

    You can't be serious. You expect us to help you cheat in an exam? Forget it.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Hex display!

    Hello, Everything in code when well there is a small problem on display output: when I run the file this is the output i got 69 6E 74 20 6D …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Hex display!

    It is quite simple: first, you need an `unsigned int` variable as a counter, which should be initialized to zero. Alter your `printf()` statement to print this counter as a …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Java help please! Pi generator loop

    I need help on this question :(. I cant seem to get the right output for this question. 5.25 (Compute pi) You can approximate pi by using the following series: …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Java help please! Pi generator loop

    The thing is, when computing a series like this, you can't simply jump to the *n*th iteration and get the right answer; you need to sum all the iterations before …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in c programming casting struct values

    Oh, and I just noticed that you dropped the semi-colon at the end of line 45.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in "\n" in C++ (help with lexical analyzers + parsers)

    > Is the way I added '\n' and '\t' okay? I'm not really sure, to be honest; it depends on whether you actually want to have some significance to them …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching c programming casting struct values

    I am trying to cast an int value in a struct to a double. I am guessing I am screwing up the parenthesis somehow. I wasn't able to find anything …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in c programming casting struct values

    Your casts are fine; the problem is that you haven't initialized the values of `start.x` and `edges.x1[0]` yet, so they have whatever garbage was in them before the program was …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 2

    Ah, OK, I think I see the problem here. When you are working with arrays, you need to use the array index to indicate which element of the array you …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 2

    I'd have to see the code that's having the problem to be able to tell you the answer, I'm afraid. Without that, all I could do is guess. What symbol …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 2

    A standard `for()` loop is used to repeat something a fixed number of times, with one variable - the *index* - changing on each iteration. It is similar to an …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 2

    You would presumably replace Cars product = new Cars(2479, "BMW M6", 45, 65000); with Cars[] products = new Cars[10]; // or however large the lot is supposed to be You …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Inventory Program Part 2

    I am new to java programming and I have to write an inventory program that can hold multiple items. I have my code from week 1 but I do not …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 2

    Yes, we can, but we'd need to know what you have done already, or at least what you know how to do. We might need to see your code, or …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching "\n" in C++ (help with lexical analyzers + parsers)

    Say I have something similar to this: http://faculty.utpa.edu/chebotkoa/main/teaching/csci3336spring2013/slides/lexsyn/sample-lex-syn.html Does anyone know how I would be able to make "\n" or "\t" recognized as a token? I would probably need to …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in "\n" in C++ (help with lexical analyzers + parsers)

    > I would probably need to add a case for it in the switch in LexicalAnalysis.cpp, right? And add it to the state diagram? If you want them as separate …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching ABC Loans Company

    ABC Bank gives loans to its customers at a monthly interest rate of 0.75%, and recipients are expected to make fixed payments every month. The bank uses the formula below …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in ABC Loans Company

    First off, this is the C++ forum, not the C forum; you'll want to ask questions about C programming there. Second, all you've done is post your assignment; you haven't …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in pyramid pattern with alternatice star and dot

    No. The [rule](https://www.daniweb.com/community/rules) at DaniWeb are simple: > Do provide evidence of having done some work yourself if posting questions from school or work assignments We can provide assistance, but …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Visual Studio isn't creating .exe file???

    I really need help with this. I've been using Visual Studio for C++ and Assembly, and I can build my projects with zero errors, but when I try to Debug …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Visual Studio isn't creating .exe file???

    Have you checked the C:\mypath\Release\ path?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching pyramid pattern with alternatice star and dot

    Hi all i want to print * .. *** .... ***** In pyramid form please help..
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in pyramid pattern with alternatice star and dot

    You will want: * a variable that holds the character currently being printed * an outer `for()` loop to count the number of lines to print * an `if()` statement …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Array of struct implementation in C

    Sorry, I just realized I didn't answer your actual question; my apologies. As for whether you need to dynamically allocate the memory, in the case of a linked list, then …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Array of struct implementation in C

    I need some ideas on my array of struct implementation. This is what I have in my structs. I plan on making SHAPES an array because I will have multiple …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Array of struct implementation in C

    First off, I would recommend that, rather than having individual named structures as one-off types, that you define a POINT struct type and use that as the basis of your …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Programming challenge (using functions)

    **It is my humble request if I can get minior help with function definition at the end where its says--- int countvowels (string test) { ** #include <iostream> using namespace …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Programming challenge (using functions)

    OK, you have some of the idea, but you seem confused about some aspects, such as parameteters and return values. Let me give some suggestions. First off, your goal is …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching how to move the yellow buttons in keyboard controls?

    Hi guys, I have added the list of buttons for the channels and programs in the xbmc skin. I have one yellow box on the channel and program box for …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in how to move the yellow buttons in keyboard controls?

    I assume that the OP is referring to [XMBC Media Center](http://xbmc.org/), but I don't know enough about it myself to make sense out of the question, either. I would suggest …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching analog computer

    why is the realibity of analog computer low ??
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in analog computer

    Actually, reliability is not the real issue with analog computers; indeed, they can be much more reliable at times, as they don't have issues of round-off errors and so forth …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in SQL injection with python

    Except that SQLite is a completely different database system.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching SQL injection with python

    Hello fellow python lovers of daniweb.com. This isn't as much a question as much as the fact that I want to see how different people would go about using python …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in SQL injection with python

    Actually, you've misunderstood what the term '[SQL injection](http://en.wikipedia.org/wiki/SQL_injection)' means, and fortunately for you, your script doesn't involve any. All your code does is open a connection to a MySQL database …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Help me in c++

    Using an array write a program that asks for 10 numbers of type int stores it in an array and traversing each item counting the number of items that are …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Help me in c++

    Then that would be your first step, wouldn't it? Writing out even a basic skeleton on a class and a `main()` function would at least give us code to discuss. …

The End.