Right now i am doing an assignment but find it very hard to parse the user input in C. Here is kind of input user will input.
INSERT Alice, 25 Norway Drive, Fitzerald, GA, 40204, 6000.60
Here INSERT is the command (to enter in link list)
Alice is a name
25 Norway Drive is an address
Fitzerald is a city
GA is a state
40204 is a zip cod...
Hello everyone...I do have a hw question...I have to write a remove method for a binary search tree, so far what I have is below but I keep getting a bunch of errors associated with my remove method and I'm not sure why...would someone please be able to check my code. Thank You. I also tried to create a find method but I'm having some tr...
hi, im quite new to xml, can someone tell me what exactly this code is code is supposed to do?
<?xml version="1.0" encoding="ISO-8859"?>
<!DOCTYPE person [
<!ELEMENT first_name(#PCDATA)>
<!ELEMENT last_name(#PCDATA)>
<!ELEMENT PROFESSION(#PCDATA)>
<!ELEMENT name(first_name, last_name)>
<!ELEMENT person (name, profe...
I have written two modules DLatch and RSLatch and i want to write verilog code to join those two to match the diagram here: (
http://img130.imageshack.us/i/mod.tif/
However i dont know how to go about doing this.
...
int number;
cin>>number;
switch (number)
{
case 1:
cout<<"My Favourite Subject is";
break;
case 2:
cout<<"Fundamentals of Programming";
break;
case 3:
cout<<"Exit";
break;
default:
cout<<"Invalid Data";
}
...
hi all,
i am working with complex networks. I want to find group of nodes which forms cycle of 3 nodes ( or triangles) in a given graph. As my graph contains about million edges, so the use simple iterative (multiple "for" loop) is not very efficient.
If someone knows any algorithm which can be used for finding triangles in graphs, kind...
I am trying to create a checking program to see if the word is in a matrix horizontally or vertically. I have the code for checking the row, but would checking the column be similar to the row code?
def checkRow(table, r, pos, word):
for i in range(0, len(word)):
if table[r][pos+i] != word[i]:
return False
re...
For an assignment, I have to declare a struct as follows:
struct Food
{
char *name;
int weight, calories;
} lunch[5] = {
{
"apple", 4, 100
},
{
"salad", 2, 80
}
};
In my main, I am trying to ask the user for the rest of the inputs to fill the struct to print them out. I figure I would try to use ma...
program chooses the number to be guessed by selecting an int at random in the range 1-100. The program then displays the following ext in a label:
I have a number between 1 and 100 -- can you guess my number? Please enter your first guess.
A TextBox should be used to input the guess. As each guess is input, the background color should...
Hi,
I would like to read a thin YAML file using a simple C program. I beleve the best way for this is to use the follow library: Pyyaml.org.
After reading the wiki page, I have try to use some examples here:
http://pyyaml.org/browser/libyaml/branches/stable/tests/
But for a noob like me, it is not very simple to understand.
If for exa...
Hi ,
i am new to java regular expression.
Consider the follwoing paragraph :
The Internet is a global system of interconnected computer networks that use the standardized Internet Protocol Suite (TCP/IP) to serve billions of users worldwide. It is a network of networks that consists of millions of private and public, academic, busines...
This is a homework problem - so I would appreciate if you could tell me what I am doing wrong and how to fix it, resp. how to optimize my programing techniques :). Thanks!
I built this to save the employee in the array - it will save the first one right but when it saves the others it shows up blank - right out of the constructor. Why...
We were given an assignment that involved taking information from a file and storing the data in an array. The data in the file is sorted as follows
New York 40 43 N 74 01 W
the first 20 characters are the name of the city followed by the latitude and longitude. latitude and longitude should be easy with a few
fscanf(i...
I'm working on a homework assignment translating a C program we wrote to MIPS. My question is about general MIPS coding and not project specific issues though. I've run into an issue with printing my output. I have an array and output string declared as such:
array: .word 7, 2, 5, -3, 3, 6, -4, 1
output1: .asciiz "Array: \0"
I'm tryin...
This is sort of a homework question, however no expectations for code or whatever just an idea or hint towards the following problem.
I have a set of cubes in 3D world coordinates and i have to display them using two projections in two separate areas, parallel and perspective. The parallel went fine, no problems there, however displayin...
Which of the following components of program state is shared across threads in a multithreaded process?
Register values, Heap Memory, Global Variables and Stack memory.
My suggestion; Only global variables, global variables are allocated on the heap? So Heap memory and Global Variables. Is this correct?
...
How to convert a list to a string in Oz?
I have a list of characters I need to convert to a string and I didn't see any concatenation operator in the Oz documentation.
...
I have a class in which I'm trying to overload the << operator. For some reason, it is not being overloaded.
Here is my .h file:
friend std::ostream& operator<<(std::ostream&, const course &); //course is my class object name
in my .cpp, I have this as my implementation:
std::ostream& operator<<(std::ostream &out, const course & rhs...
[Disclaimer: I am new to PHP, and I am just learning, so please no flamers, it really hinders the learning process when one is trying to find solutions or information, thank you, and the code works fine in terms of the crossword puzzle, it's just really baffling me how one gets a diagonal orientation with the given information, or what I...
procedure max (a[1..n]: integers)
max := a[1]
for i := 2 to n
if max < a[i] then max := a[i]
Is the complexity O(1) or O(n) with the best case scenario? The sequence contains n elements. It is pseudocode.
...