Sounds like an incredible mission. Surely there's some way of going about this, as there are lots of commercial apps that can update through a proxy etc.
Type: Posts; User: cyberCLoWn
Sounds like an incredible mission. Surely there's some way of going about this, as there are lots of commercial apps that can update through a proxy etc.
All my university's internet traffic goes through an HTTP proxy. What I need to do is download XML files from certain websites, but before I can access these websites I need to authenticate through...
I'm a university student and am looking to purchase some books for myself. I'd call myself a fairly intermediate programmer with knowledge in Java and C++.
What I've done is searched through...
A snippet of my code:
// cycle through list of words
for(list<string>::iterator i = inputFile.begin(); i != inputFile.end(); i++) {
string word = *i;
// compare to...
Yes, it was a linking problem, but it's sorted out now.
Thanks for your assistance laserlight. Stay cool man.
I think I was incorrect in using Stack testStack(). Anyhow, I changed it to Stack testStack, but now I get the following:
I'm trying to build a stack class. Bascailly it consists of the following files:
// listnode.h
#ifndef LISTNODE_H
#define LISTNODE_H
class ListNode {
public:
int data; // stores...
void addHeader(packet x) {
unsigned char temp[20] = {'A','F','A','F','1'};
int count = 0;
for(int i = 5; i < 20; i++) {
temp[i] = x.data[count];
count++;
}...
memcpy(&x.data, &temp, 20);
Right I see that. It does not crash now, but however it outputs the original data that was first outputted.
As for the sizeof, yeah I guess you're right.
I have...
Basically what I am trying to do is modify the contents of the place where the structures data pointer points to. I have to add 5 arb characters onto the packet's data.
When I run the program...
Hey there.
I've been working on Java in a course I'm doing at university. In the past I worked on C++ and found this place immensly useful and I just wanted to know if there is a place I can look...
Make the function return a void if there is nothing to return. If it returns a value then let it do so.
I never even thought about that scribbler. Thanks for the clarification.
So, what do I do about the optimization flags? (-01, etc)
Right, I agree about the sqrt() being done once outside the loop. Still, why is int i in the for loop incremented by 2 each loop?
Right, I'll definitely look into the above mentioned optimizations. Thanks so much.
What did you mean by this though?
What do the -O1 through to -O3 optimizations actually do? What is the...
I have written a program which tests for prime numbers. Please could someone review my code and tell me if there is any way to optimise it as once you start hitting large numbers it takes that much...
I was not using pointers. Your example also displays an error. The error only happens with a long unsigned int. With a normal int everything works fine.
Performance wise, is it worth using...
I have some code which does not work and I was just wondering why and also how to fix it.
else if( choice == 1 )
{
long unsigned int num;
cout << "\nEnter number:...
Guess I see what you mean. This was just a quick refresher project to get me back into the swing of C++. Have not really had a chance to touch it in a while.
Thanks anyhow Thantos
Dunno, but it works :D
Got it.
cout << right << setw( 7 ) << num1 << " -" << setw( 3 ) << num2 << setw( 5 ) << "= ";
I can't get this sorted.
cout << setw( 7 ) << num1 << " - " << num2 << setw( 5 ) << "= ";
The above gives me the following:
4 - 3 = x
14 - 14 = x
1 + 1 = 2
10 + 1 = 11
2 + 2 = 4
:rolleyes:
I would definitely recommend "C++ How To Program" 4th edition by Deitel. You'll either love or hate this book and I am one of the many that love it.
Do a search on amazon and read the reviews...
Really a silly question but this solution evades me.
As you can see, double digits move the entire line one digit to the left, how can I correct this? I presume setw() is needed.