- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I'm a software engineer.
- Interests
- As far as computers/electronics go, I'm interested in Linux, programming, embedded systems - anything…
- PC Specs
- Modified HP tower. Gobs of RAM, gobs of HDD, gobs of CPU.
23 Posted Topics
Re: What model Gateway is the machine? On some models, the system will work fine if the battery is dead/not-installed as long it is connected to power through the A/C adapter. | |
Re: I have to disagree with 7. The terse warning system is one of my favorite parts of Linux. Maybe its because I use Unix for work and I've gotten used to the fact that my Linux boxes won't warn me if I tell them to recursively delete my home directory. … | |
I'm working on a script that needs to use the Github API to allow the user to gain access to their Github account. I'm still really new to web programming, so I'm not really comfortable with how to securely transmit username and password combinations. I'm just wondering what are some … | |
I'm trying my hand at OpenCV and have run into a problem that Dr. Google hasn't been able to help me out with. According to O'Reilly, the following code should play an AVI file in a window the program creates. [CODE] #include "highgui.h" #include <stdio.h> int main( int argc, char** … | |
Re: Have you tried using formatted output? As far as I know, if you want alignment you have to specify it in your output. I could be wrong though. | |
Re: I hate to dig up an old post, but the two terms are not exactly the same as some imply. The differences are subtle and may vary by country or company. I hold a degree in Computer Engineering with an emphasis on Software engineering and my function is primarily that … | |
Re: bettybarnes, Aia is right. The simple question you ask has very complicated answers. When your problem space involves multiple, separate computer systems you're going to have to start using some moderately advanced techniques to handle network data. Do you have any experience with network programming in C? If so, I … | |
Let me start off with this disclaimer: [B]This scenario is completely contrived.[/B] The scenario proposed is analogous to an actual problem that I am trying to solve. Problem: I'm going to cheat on a test that uses Scan-tron style cards. I've stolen the test before it was handed out and … | |
Re: Poor woman. It doesn't make sense that she could be held accountable, when even the police don't know how the "crime" happened. We would all be in trouble if that rationale spread beyond net crimes. | |
Re: What type of message is ssh returning? I just installed 9.04 on one of my machines yesterday and loaded openssh. I was able to login from my Mac right away. My setup is a little different though, I'm using 9.04 desktop not server - so there may be some differences. | |
Re: There are libraries that generate better pseudo-random numbers. The rand() function in the standard libraries is - as you've seen - a poor substitute if you really need random numbers. I ended up searching Google last time I needed a random number generator. Someone on here may have more info … | |
Re: You might be able to get by with using a macro. [code=c++] //function.h #define GLOBAL 9000 [/code] In this case, any file that includes funtion.h will have access to a macro called GLOBAL, the result will replace every instance of GLOBAL with the value 9000 during preprocessing. If you go … | |
Re: [icode]#define[/icode] is preprocessor directive - it literally tells the preprocessor to replace [icode]n[/icode] with [icode]10[/icode]. [icode]const[/icode] is actual C++ - it says that [icode]n[/icode] is a constant of type int that is assigned the value 10. They'll do about the same thing, but are used for different reasons. In this … | |
Re: 1. Don't forget code tags. 2. [icode]char word;[/icode] only declares a character. To use strings you have to include the string header file. | |
Re: I think you might be able to get it done if you use [B]cin.peek()[/B] and [B]cin.ignore()[/B]. You'll have to loop them so that if the next character matches the current, the next is ignored. | |
Re: Have you tried opening the file with ios::in instead of ifstream::in? | |
Re: [QUOTE=computer engW;572693] Seconed question is: -Write an interactive program that computes the area of a rectangle (area= base * height) or a triangle (area=0.5 * base * height) after prompting the user to type the first character of the figure name (R or T). Your program must display an error … | |
Re: [code=C++] #include<iostream> using namespace std; class Rectangle { private: double length ,width ; public: double getW(); double getL(); void setW(); //<-Needs to pass a double void setL(); //<- Needs to pass a double double findArea(double&;double&); //<-See chandra.rajat's post void display(); }; double Rectangle::getW(){ return width ; } double Rectangle::getL(){ return … | |
Re: First: Your [icode]Calculate_GPA[/icode] needs to accept the [icode]classes[/icode] from your main function. But since it doesn't actually need to operate on [icode]classes[/icode], you can get by with making it a constant in the arguments list. You can then make the changes in the definition (it has to match the prototype). … | |
Re: Your first code section won't pass the requirements specs - it doesn't use any functions. The second section won't compile because you have mismatches between your function declarations and your function definitions. | |
Re: [U][I]The Complete Reference C++ (4 ed)[/I][/U] goes into pretty good detail about the relationship between a class and a struct. Basically, the struct is part of the C subset of C++ and was kept in the language (with some enhancements) so that C++ would always be compatible with C. The … | |
Re: Don't forget to move your [icode]system("PAUSE")[/icode] and [icode] return 0;[/icode] statements down. Where they are now, they'll terminate before your program can do its job. | |
Re: C++ offers the [inlinecode]rand()[/inlinecode] function to generate pseudo-random numbers. Here's a quick and dirty example using rand. [code] #include<iostream> int main(int argc,char** argv) { int lowBound = 0; int upBound = 0; int random = 0; //Get lower bound (a) std::cout << "Input lower bound: "; std::cin >> lowBound; std::cout … |
The End.