I'm working on a homework assignment in which I'm required to use char arrays instead of strings and qsort/bsearch. In my call to bsearch below, I know I'm passing the wrong size of Entry, but I'm not sure how to get the real size, and my compareEntries function is therefore not finding the right objects.
Can anyone help me understand ...
This is my first time on this site and I appreciate any help on my problem. I am in my first C++ class and I admit I am not an expert at computer programing, so if you could make your answers as dumbed down an specific as possible it would help out my beginner status immensely.
I will be creating a program that decodes encrypted text f...
I'm trying to generate prime numbers based on user input.
this is what i have so far but i just can't seem to figure it out:
Console.Write("Please enter the number of prime numbers you would like to see:");
int numberOfPrimes = Convert.ToInt32(Console.ReadLine());
for (int x = 0; x < numberOfPrimes; x++)
{
...
As an exercise for my Java course in Uni this morning, I had to write a small program to ask the user to input some details, then print them back. I've since finished writing it, but I ran into a strange problem along the way.
See the code below:
import java.util.Scanner;
public class Scanner_Exercise
{
public static void main (S...
I'm not sure how to fix this or what I did wrong, but whenever I enter in a value it just closes out the run prompt.
So, seems I do have a problem somewhere in my coding. Whenever I run the program and input a variable, it always returns the same answer.."The content at location 76 is 0."
On that note, someone told me that "I don't kno...
i dont understand the problem with returning multiple rows:
here is my table BBC:
name region area population gdp
Afghanistan South Asia 652225 26000000
Albania Europe 28728 3200000 6656000000
Algeria Middle East 2400000 32900000 75012000000
Andorra Europe 468 64000
Angola Africa 1250000 14500000 1493500000...
I'm supposed to write a program that will send some values to registers, then wait one second, then change the values. The thing is, I'm unable to find the instruction that will halt operations for one second.
...
How to trim a PHP array and remove all empty indexes
Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] => 4
[8] => 6
[9] =>
)
Output should be like
Array
(
[0] => 4
[1] => 6
)
...
I am trying to implement the odd-even transposition sorting algorithm in c with multi-threading. The program will receive a file with a line of integers that need to be correctly sorted. I have created the array that the program will work with and I am reading in the data correctly. Although, I am not quite sure how to create the threads...
So I'm attempting to use a queue to parse some input, turning prefix mathematical expressions into infix mathematical expressions with parentheses. For example: +++12 20 3 4 turns into (((12+20)+3)+4). For the most part, my algorithm works, except for one specific thing. When the numbers are greater than 2 digits long, the output becomes...
I need to write just a function that counts the number of integers in an already opened and good text file.
a. Assume there is a text file with a large number of integers divided by spaces
b. Write a function called analyzeFile that accepts a previously opened ifstream
file object as a parameter, and counts the number of integers in th...
please anybody having travelling salesman problem solution
in Standard ML, plz tell me.
I've tried a lot but am not successfull...
Thx in advance.
...
I have a sequence.
a1 = 1 - cos(x);
ai = a1 + (-1)^(i-1) * x^(2*i-2) / (2*i-2)!
I need to write this with and without recursion. But it has a different results.
Here is my code: http://codepaste.net/q213q6
...
At the moment, I'm creating a java schedule app and I was wondering how to find the current day of the week while using the Calendar class to get the first day of the week.
Here is the method I'm using in a class in order to set up a week schedule
public static String getSunday() {
SimpleDateFormat d = new SimpleDateFormat(dayDate)...
This is part of a homework assignment. I've got several questions asking find the eid of the employee with the highest salary, or 2nd highest salary. Find the pilot that is certified for the most aircrafts. I don't have any idea on how to do it. There aren't any examples in the chapter, and google is proving less that helpful. If someone...
For a school project we're developing a game that's a little like Conway's game of life, with different organisms taking up slots in the world and then eating each other. I would like to see this take place in a 2d world. Like being able to take starcraft and have zergling and marines play roles. The problem with starcraft is that the wh...
Hi,
Im getting a strange syntax error when I run this in VB
SQLString = "UPDATE Login SET Password = '" + PasswordTextBox.Text + "'"
SQLString += " WHERE UserName = '" + UserNameTextBox.Text + "'"
The Username is checked before getting to this part and is definitly in the db.
It gives an exception saying syntax error ...
Hello there, I would appreciate it if anyone can answer my question.
Identify the implicit cast and explicit cast?
int a = 2, b = 3;
float f = 2.5;
double d = -1.2;
int int_result;
float real_result;
...
Question
I'm trying to create a basic wxWidgets program with a text entry box, in the constructor there is a variable wxTextCtrlNameStr - in researching I can't seem to find wxTextCtrlNameStr? any help?
Given Code documentation:
wxTextCtrl(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaul...
I'm working on a program that uses an ArrayList to store Strings. The program prompts the user with a menu and allows the user to choose an operation to perform. Such operations are adding Strings to the List, printing the entries etc. What I want to be able to do is create a method called removeDuplicates().This method will search the A...