Beginners - January 2009 (Page 10)

assistance with ping command
 
#include <iostream> using namespace std; int main() { int ip; cout << "Please Enter An address \n"; cin >> ip; system ("ping ip")...
[1 reply] : Is your executable by any chance called "ping"/"ping.exe"? By the w... (by helios)
display the characters for ASCII code
 
#include <iostream> #include <conio> int main() { for(int a = 0;a<8;a++) { cout <<endl; for(int b = 0;b<17;b++) { cout<<static_cast<char>(a); ...
[2 replies] Last: Well some of those characters aren't printable while others such as CR... (by jsmith)
MS Visual C++ 6.0 Errors in Code
 
Hello, Working on this assignment for class and I keep getting these errors, I have pasted the code below, could someone look at it and see what I'm doing wrong...
[5 replies] Last: There's no main(). (by helios)
Referencing in a Function
 
How would I properly write the following: void instance_create(baseClass& nameOfDerivedClass) { nameOfDerivedClass newInstance; instances.push_back(...
[10 replies] Last: I am writing an object manager that manages a base object which has de... (by ebarroga)
by xanmas
Global Variables
 
Hi, I was wondering, what are the disadvantages of using global variables? How does c++ keep track of them, etc. Also, is there any chance that global var...
[3 replies] Last: I was wondering, what are the disadvantages of using global variables... (by Zaita)
Scaffolding
 
Good afternoon all. New to C++, and have what probably is an elementary question. I am using Dev-C++ for the first time. I created a project, a source file...
[2 replies] Last: Yeah just saw that. Thanks. (by woody3377)
extract bytes from certain positions
 
Say I want to extract certain amount of bytes from a certain location and copy the bytes back to the current position of a bin file. eg a2 has 0C CD D2 C9...
[1 reply] : Try with the seekg function http://www.cplusplus.com/reference/iost... (by Bazzy)
casting enums
 
I learning how to transition from C to C++, and having problems with casting. I don't know how. Here's snippets of my code: class RECORD { public: cha...
[2 replies] Last: worked perfectly thanks. Stylistically does any one have problems w... (by nowrd2xpln)
overloading stuff for std::stack
 
G'day all. Im trying to create a stack function that will print the entire contents of the stack - but the problem is the STL doesnt like it. it looks somethi...
[11 replies] Last: ahh right, gotcha. Thanks for all your help (by bgbnbigben)
by DNRN
Function problem
 
First of all this is not some homework! I am trying to make a trajectory of a ball, which are shot from the top of the screen with a velocity and falling in a g...
[4 replies] Last: Thanks for the help :D I solved my problem another way.. But my pro... (by DNRN)
cout<<00221
 
Please can somebody tell how to cout<< number like example 00844 if i want see 00 too, not only 844.
[6 replies] Last: #include <iomanip> cout << setfill( '0' ) << setw( 5 ) << 844; ... (by seymore15074)
strings- novice here
 
Working on a small script here but having some trouble getting a string to work. here is a code snipplet: int itemscan; srand((un...
[1 reply] : Firstly, you need to convert your number to a string before you can jo... (by Zaita)
back gound Colour
 
How to set a background colour.........
[5 replies] Last: ...yes, that's exactly what the code does. If you read that post AT... (by demosthenes2k8)
by sadon
bits manipulation
 
Hi all I used this code to switch bit4 with bit0 a0=a & 0x01; a4=a & 0x10; aa=a & 0xEE; e=aa |(a0<<4)|(a4>>4); it is ok but a kind of long if...
[1 reply] : Nope. That's the shortest possible. It can be made more generic, thou... (by helios)
Really basic questions about libs and dlls
 
Okay, so I've never understood libs and dlls fully, even though I've been coding on and off for almost 7 years... pretty bad, eh?. So, a .lib is just a file co...
[5 replies] Last: Java and all of the .NET languages (C#, VB.NET, etc.) generate bytecod... (by helios)
by dhanny
Recongising math Expression
 
Hi, mates! I want to create a binary tree, from given arithmetic expression (including numbers, operator : '+', '-', '+', '/' and brackets) and then evaluet...
[3 replies] Last: Consider the Interpreter pattern. It is not easy to implement but it ... (by seymore15074)
by L J
CPU (and Memory) usage in C++
 
Hi, I need to know, how can I uncover CPU and memory usage, like in the TSKMGR. I am using Dev-Cpp and I have tried to find it by Google, but I still do not k...
[2 replies] Last: TSKMGR uses win32 NAPI (a simple api hooking shows it) See on Win32 n... (by george135)
Class Reference Problem
 
Hi everyone, im new to C++ and i'm having a few problems with reference. Here is my example. Foo.h class Foo { private: int myA = 0; int ...
[2 replies] Last: I just realize what i was trying to do. The command that i was looking... (by tvborda)
by kfex
What i don't get?
 
There are a few things i don't understand Can someone help me. I Want to know what this line of code doing - Mammal():itsAge(2), itsWeight(5){} I know Mam...
[2 replies] Last: Question 1: Mammal():itsAge(2), itsWeight(5){} That is an initia... (by Bazzy)
bit checking
 
How do you check bits in an unsigned int eg $35 = 00110101 how would I check if the 5th bit is 0 or 1 Thanks in advance
[2 replies] Last: There is an article on this: http://www.cplusplus.com/forum/articles/6... (by Bazzy)
January 2009 Pages: 1... 89101112... 16
  Archived months: [dec2008] [feb2009]

This is an archived page. To post a new message, go to the current page.