- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
22 Posted Topics
I have an XML file that is in this format: <root> Test string <Signature> WvZUJAJ/3QNqzQvwne2vvy7U5Pck8ZZ5UTa6pIwR7GE+PoGi6A1kyw==</Signature> </root> I was able to produce the SHA256 and produced a string by using the following: string CalculateSHA256(const string& input) { SHA256 hash; string digest; StringSource _(input, true, new HashFilter(hash, new HexEncoder (new StringSink(digest)))); return … | |
I have an xml file that I have to read in, convert all the carriage returns to \x0D and line feeds to \0xA, then call it into a function as a string. So for example my XML file is: <TEST> this is a string </Test> I would want a string … | |
current code: [CODE] void showMedian(int *array, int size) { double middle; double average; middle = size / 2; if ( middle % 2) { average = (*(array[middle]) + *(array[middle + 1])) / 2; cout << "The median is: " << average << endl; } else cout << "The median is: … | |
Current Code: [CODE] void findMode(int *array, int size) { int array2[size]; int count; int x; int mode = 0; for (count = 0; count < size; count++) { x = array[count]; array2[x] = array2[x]++; } for ( count = 0; count < size; count++) { if (array2[count] > mode) mode … | |
I am having trouble printing onto a JPanel. I am able to print any string that i want to. here my code: [CODE]import javax.swing.JFrame; import java.awt.BorderLayout; import javax.swing.JLabel; public class TestDraw { public static void main(String[] args) { final int WINDOW_WIDTH = 300, WINDOW_HEIGHT = 300; DrawPanel panel = new … | |
I am trying to create random rectangles and ovals. This is what i ahve so far: [CODE]import java.awt.Color; import java.awt.Graphics; public class MyRectangle { private int x1; private int y1; private int x2; private int y2; private Color myColor; //constructor with input values public MyRectangle( int x1, int y1, int … | |
Re: First off fix this [CODE] cout << "Enter your address starting with your name then street then city then state then zip code, seperate each section with a space and then a # the immediatly following the # enter the next set ... [/CODE] add " and a ; at … | |
Here is the error: [CODE] cannot convert parameter 1 from 'int *' to 'int *[]'[/CODE] here is my code: [CODE=cpp] #include <iostream> using namespace std; void findMode( int *, int, int); void selectionSort(int *[], int); int main() { int *numbers; //dynamically allocate an array int elements, //holds the number of … | |
i am seeing this error: error C2106: '=' : left operand must be l-value here is the code [CODE]bool swap; int numTemp; char charTemp[30]; int count; do { swap = false; for (count = 0; count < (size -1); count++) { if (array[count] > array[count + 1]) { numTemp = … | |
Heres my current code: [CODE] const int SIZE = 100; //constant 100 const int COL = 30; //number of columns int testScores[SIZE]; //test score array char students[SIZE][COL]; //student names array int numTests; //the number of tests char *namePtr; //char pointer int *numPtr; //number pointer int count; //counter numPtr = testScores; … | |
Re: If you want it to print out 0's then set the array to 0's [CODE]int seats[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};[/CODE] with this you're setting each array with it's respective number. also as a heads up if you're looking for this to loop until … | |
here is my current code: [CODE]#include <iostream> using namespace std; int bubbleSort(int [], int); int selectionSort(int [], int); void showArray(int [], int); const int SIZE = 20; int main() { //The array with unsorted numbers int numbers[SIZE] = {23, 44, 2, 6, 15, 70, 45, 80, 46, 30, 0, 11, … | |
Re: It will not be able to know the difference between the names and the actual numbers when you read the files and set them to something. fyi | |
Re: <Yeah, thanks. I think I get it, but only time will tell. You sound iffy, so in other words what that first line does for you is it gives it an assigned value. without an assigned number it can't compare anything to it. so during these lines: [CODE]for(i=0; i<10; i++) … | |
Heres the part of the code That i have: [CODE] #include <iostream> using namespace std; const int NUM_DIV = 6; //Number of divisions const int NUM_QTRS = 4; //Number of quarters void divisionSales(double [][NUM_QTRS], int); void divisionChange(double [][NUM_QTRS], int); void quarterSales(double [][NUM_QTRS], int); void quarterChange(double [][NUM_QTRS], int); int main() { … | |
Heres the situation: I am taking a C++ course online. I had a PC up until about a week ago when i got a Mac. Now i must do all my work on the only computer i have, the Mac. I turn in my work at the end of the … | |
Re: [QUOTE=Narue;466261]>I do not appreciate the last two comments Don't worry. Others will appreciate them. :) >and I have not seen any code similar to mine Here's one: [url]http://www.daniweb.com/forums/thread95911.html[/url] >If I were cheating I would at least pick one that is done I don't know, I've seen some pretty lame attempts … | |
Re: Lol is there a way to kill treads, this one just seems useless. | |
Re: If youre still lost heres some code you can use: [CODE] #include <iostream> using namespace std; int main() { float sum_of_positive = 0.0; float sum_of_negative = 0.0; float counter; for (counter=-2.3; counter <= 3.0; counter+=.4) { cout << counter << " "; if (counter < 0) sum_of_negative +=counter; else sum_of_positive … | |
What i need to do is convert the first letter of ever word into a caps letter. I know that in ASCII the lower case letters are between 97 and 122 and all i need to do it -32 to get the caps version. Now my problem is how do … | |
This is the current assignment: Write a program that determines which of 5 geographic regions within a major city (north, south, east, west, and central) had the fewest reported automobile accidents last year. It should have the following two functions, which are called by [I]main[/I] [I]int getNumAccidents()[/I] is passed the … | |
this is my current code: [code] #include <iostream> using namespace std; void celsius(double); //Main int main() { cout << "Now displaying the first 20 fahrenheit temperatures and\n" << "showing the Celsius equivalent.\n"; //Loop for displaying the table for (int couter = 0; couter <= 20; couter++) celsius(couter); return 0; } … |
The End.