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

    Replied To a Post in I need help in C code

    Would mind explaining why you want to separate them in this manner? It would go far in giving us a better idea of how to help you. However, as I've …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching How would you guys use bubble sort C++ on Excel?

    Not sure how to put my code in to excel. 1.#include <iostream> 2.using namespace std; 3. 4.int main() 5.{ 6. const int n = 20; 7. int Array[n] = { …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in How would you guys use bubble sort C++ on Excel?

    If you don't mind me asking, why would you need to, given that Excel can sort a row or column of data with a single push of a button? I …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching I need help in C code

    Please l have single processor C code and I need to write it in multiprocessor with mutul exclusion. Can any ony one help me. I have uploaded C code as …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in I need help in C code

    OK, first off, this code as posted isn't valid; you have the `TestAndTest()` function (which I assume is actually supposed to be `TestAndSet()`, but that's an aside) inside the `main()` …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Just need a second pair of eyes (or 3 or 4...)

    As for compound data structures, I can see that you haven't covered them, which means that it probably means that you aren't free to use them for this project; however, …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Just need a second pair of eyes (or 3 or 4...)

    By explict function, all I mean is a function which explicitly returns a value. For example: int foo(int bar) { return 23 * bar; } which would be used like …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching If statement to print worker name

    I cant get my intended result I want my program to display can anyone help me. The program is to print the workers name who are listed in the struct …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in If statement to print worker name

    In C, you cannot directly compare compound structures such as strings the way you can simple values such as `int`s or `double`s; or rather, you can in the case of …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Just need a second pair of eyes (or 3 or 4...)

    I am in my first semester of computer program and this my third project. I am taking this class online so I do not have the in-class benefit of working …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Just need a second pair of eyes (or 3 or 4...)

    While the program looks good functionally, I would like to make some stylistic suggestions. 1. You generally want to separate the functions which operform computation from those which do input …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Tell me why this is happening

    For what it is worth, here is my full solution, which may or may not make enough sense to you to give you a leg up: #!/usr/bin/python3 # Rock Paper …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Tell me why this is happening

    Oops, I just noticed that I dropped the ` player2_hand ==` part of the each of the inner `elif`s in that second function. My bad. def print_match_results(player1_name, player1_hand, player2_name, player2_hand): …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Tell me why this is happening

    So I wrote this program this evening...it was working just fine and when I started trying to tweak the display I started getting syntax errors on my global elif's. Here's …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Tell me why this is happening

    The problem is quite simple: your indentation is off. Lines 25-65 need to be one level of indent to the right. > Please don't tell me how to shorten it, …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching binary file

    I have to create function that reads the binary file of futball matches and shows the legue table. The table should contains, for each team, the name of the team, …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in binary file

    Part of the problem lies in trying to write out the `struct`s directly, rather than writing the individual fields out in an system-independent form (a process called *serialization*). A `struct` …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Save Android Image Overlay

    Hey everyone! I'm brand new to Android and have been working on a very basic app that just takes a picture with an image overlay and saves it. So far …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Save Android Image Overlay

    **Darwin_1**: You might want to check the timestamp on the thread; Baudday hasn't been active on Daniweb in three years. Also, it is generally considered bad form to ask for …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching how to find the most repeated number in array ?

    say we have array[6] .. i want to ask user to enter 6 values to the array and if there is any repeated value the program will cout them .. …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in how to find the most repeated number in array ?

    There are two really simple approaches you could take: 1. Use two loops, inner and outer, which step through the array. Have a second array hold any duplicate values you …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Randomise Function

    Not exactly; as was explained above, in the old Borland C++ compilers, there was a macro actually called `randomize()` that was basically a shortcut for both initializing the randomizer and …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in about function

    *deleted for duplicate post*
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching about function

    who can help me on solvin this problem in c++ by not using math.h only a function; problem:x^n
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in about function

    **rose_2**: While your enthusiasm for answering the question is commendable, it is generally considered a poor practice to provide outright answers to problems when the OP hasn't demonstrated that they …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching C++ Minimum distance between cities and minimum travel time error

    #include <iostream> #include <fstream> #include <cstring> using namespace std; int va[20][2],i,j,iesire,intrare,st[21],as,ev,k=2,timp,mint=10000,d=0,t=0; float distanta,mind=10000; char comune[65][25]; struct intr { int t; float d; }v[65][65]; void init(int k,int st[21]) { st[k]=0; } …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in C++ Minimum distance between cities and minimum travel time error

    I would add that the [Travelling Salesman Problem](https://en.wikipedia.org/wiki/Travelling_salesman_problem) (which this could be, depending on you interpret the traversal requirement) is known to be an NP-Hard problem, so even if you …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Web based Semester Project Ideas.

    Hello everyone, this is my first post in the community. Im doing my 3rd year in Software Engineering. We have a semester project coming up. We are 3 people in …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Web based Semester Project Ideas.

    Well, the list of suggestions linked to above is still valid, and while some are a bit small for what you want, plenty of those examples would make a suitable …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in c++ program help

    While this is true, the fact is, you didn't ask for help with a specific issue; you simply gave us the problem statement and a plea for assistance, without any …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Unusual Linking error

    Generally speaking, you want to avoid sharing the variable directly at all; global variables are generally considered an anti-pattern, something to avoid unless there is no alternative. When you need …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in High Fashion Department Store program to produce its monthly bills

    <RANT> Something has been nagging me about this problem set since it was first brought up, and I think I've figured out what it is: the assignment itself. It's just …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching compilers

    write a program for left recursion?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in compilers

    > write a program for left recursion? Setting aside the fact that you are asking us to do your work for you, which is against the general policy of Daniweb, …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Unusual Linking error

    I have these files.. **str.h** #ifndef _str_h_ #define _str_h_ struct STRSTR { char* MainStr; char* SubStr; }; char* str_str(int, int, struct STRSTR* sample); void init(char*, struct STRSTR* sample); #endif /* …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Unusual Linking error

    The reason is simple: the variable `sample` is *not* external to the **main.c** file, and in fact is a local variable of the `main()` function itself. When you declared the …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching High Fashion Department Store program to produce its monthly bills

    Hi so I am suppose to write/fix this code up so it produces a monthly bill for a store. This is what I have so far. I know its suppose …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in High Fashion Department Store program to produce its monthly bills

    Interestingly, either you or a classmate of yours posted [essentially the same issue](https://www.daniweb.com/software-development/cpp/threads/493689/high-fashion-department-store) some four days ago, under a different username. You might want to view the answers given at …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in C++ Question

    **kalsu**: Not only are you doing exactly what we told the OP not to do, you are hijacking another poster's thread to do it. If you persist in this sort …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Write a program in c++ that allows the user to enter amount in dollars and

    Write a program in c++ that allows the user to enter amount in dollars and converts its value into PKR and vice versa.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Write a program in c++ that allows the user to enter amount in dollars and

    *Once more with my standard reply for this sort of thing:* First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in a simple question upon c++,thanks!

    There should not be a '.cpp' extension on the header file, just '.h'.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching a simple question upon c++,thanks!

    My project is seperated into two files(a head file and a implementation file). But when i run the codes it comes the errors as follows: // my codes are as …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in a simple question upon c++,thanks!

    The error is a very simple one: you misspelled the header name in your program source file. Just change the 'g' to an 'e' and it should go through correctly. …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching storing data in a array of struct

    #include <iostream> #include <fstream> #include <stdlib.h> #include <iomanip> #include <string> using namespace std; const int MAX_SIZE = 60; void discard_line(ifstream &in); void print_student_records(structarray[], double scmarks[], double sfmarks[], int size) ; …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in storing data in a array of struct

    From what the OP is saying, I expect what they want is to replace string id[MAX_SIZE]; double cmarks[MAX_SIZE]; double fmarks[MAX_SIZE]; with something like this: struct student_grade { string id; double …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching problem in assembly code

    hello Friends,, i need your help please i don't understand where is the problem in my code it blocked in "the print reverse" step help me please !! with a …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in problem in assembly code

    Just a quick guess, but on line 59, I think you want to change MOV CL,INSTR1+1 to LEA CL,INSTR1+1
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in locating the header file(msoftcon.h) in a program using console graphics li

    **soe win**: You may want to read [this blog post](http://www.peter-urda.com/2010/09/solution-folders-in-visual-studio-2010-explained) if you aren't clear about what the Solution folder is and how to work with it. While the post covers …

The End.