how do u pause a command in c++? i know how to pause using system("pause") or cin.get() but i want to know hot to make the program sleep for a certain ammount of time... like vbs' wscript.sleep 1000... if that helps thanx

Member Avatar
Member Avatar
+1 forum 7

I got this big problem. I have to automate a Telnet connection for this project but I have no idea on how to do that in C/C++ :( . I need to be able to send an ascii file's contents (1 command per line) so that it will automate those commands. Then I need to save the output in a text file, and have the program analyze it. Finally i have to repeat the process automatically for the next ip in line. If this can be done all automatically already with an exsisting program, could you please direct me to …

Member Avatar
Member Avatar
+0 forum 2

Does anyone know of a good way to prevent a process from being hooked by another, or at least by detecting the hook?

Member Avatar
Member Avatar
+0 forum 7

I have just written some classes in visual c++ with MFC that give me out data I want to plot in excel. Are there any tutorials out there that will help me write a macro in excel that will pass the data to my classes then read the results given by the classes? Thanks pablo

Member Avatar
Member Avatar
+2 forum 1

////having trouble with this one after first input starts a crazy loop malf. #include <iostream.h> #include <conio.h> const int MAX_ITEMS = 5; typedef int InventoryArray[MAX_ITEMS]; void DisplayOpeningMessage(); void DisplayEndMessage(); void OutputInventory(const InventoryArray items); // const used to protect the array from being changed void InputInventory(InventoryArray items); void ProcessChoices(); void OutputOneInventoryAmount(int amount, int itemCode); void ChangeOneInventoryAmount(InventoryArray items, int itemCode); char GetItemCode(); void DeductInventory(InventoryArray items, int itemCode); void AddInventory(InventoryArray items, int itemCode); char GetUsersChoice(); void main() { DisplayOpeningMessage(); ProcessChoices(); DisplayEndMessage(); } void DisplayOpeningMessage() { cout << "\n\n\n\n\n"; cout << " Iventory\n\n"; cout << " Program\n\n"; cout << " Collective\n\n\n\n\n\n"; } void DisplayEndMessage() …

Member Avatar
Member Avatar
+2 forum 5

[font=Arial]Hello.[/font] [font=Arial] I have been given an assignment to complete by next Tuesday... (it was supposed to be a week Tuesday but my College messed up the dates). I have been told to construct the classes (base and derived) for a 'contact' program. The actual program doesn't have to work... the teacher just wants to see the coding for the classes to store information about a person i.e their name, address, telephone number, gender, (e-mail address even) and so on. He also wants me to demonstrate that I know how to use DMA (dynamic memory allocation)[/font] [font=Arial] Right, so thats …

Member Avatar
Member Avatar
+1 forum 4

how would you make a simple exe application for something like this in vis c++. so that you could send it self contained and a person double clicks it and it runs. please show the code and where you would enter it. thanks #include <iostream> using std::cout; using std::cin; int main() { int a, b, sum; cout << "enter first number\n"; cin >> a; cout << "enter second number\n"; cin >> b; sum = a + b; cout << "sum is " << sum << std::endl; return 0; }

Member Avatar
Member Avatar
+1 forum 8

[COLOR=Sienna]For people new to programming and want to learn, or for experienced programmers too. This site I am using to learn has been extremly helpful. The instructions are clear and in laymans terms so dont worry about getting lost right away. :cheesy: [url]http://www.cprogramming.com/[/url] If anybody else knows of good resource sites for c++ please post. [/COLOR]

Member Avatar
Member Avatar
+1 forum 3

I'm writing a face recognition application in Visual C++. Part of my task will involve taking an image from my digital camera as input to my pattern recognition algorithm. I am using a Kodak EZ 200. Is it possible to write a program in C which can make system calls to the camera's functions? I read somewhere that it is possible to write C code which can access a CCD Camera library. I really don't know how to go about this one. Any suggestions would be greatly appreciated. Cheers, Bullseye.

Member Avatar
Member Avatar
+0 forum 2

hey, my first post here :D and I don't think it's too much of a problem... I just can't get it to work. This is a simple Tile Engine written in GDI32/C++. Errors: c:\Documents and Settings\Default\My Documents\Visual Studio Projects\Dragon Slayer UM\Dragon Slayer UM\cMap.h(10) : error C2143: syntax error : missing ';' before '*' c:\Documents and Settings\Default\My Documents\Visual Studio Projects\Dragon Slayer UM\Dragon Slayer UM\cMap.h(10) : error C2501: 'cMap::cTile' : missing storage-class or type specifiers c:\Documents and Settings\Default\My Documents\Visual Studio Projects\Dragon Slayer UM\Dragon Slayer UM\cMap.h(10) : error C2501: 'cMap::m_tile' : missing storage-class or type specifiers [CODE] //cTile.h #pragma once #include "stdafx.h" class …

Member Avatar
Member Avatar
+0 forum 2

I'm currently in file processing and I have a project dealing with fixed length records and making an attrcat and relcat catalog. Simply: use system calls to check if a dir is there and create a new one for the database. system ("dir"); system ("mkdir Rambo"); system ("cd Rambo"); system ("mkdir Rambo"); tried that after searching the net and it didn't work. It won't CD properly. Although my biggest problem is the catalogs. the fields are supposed to be; relcat(chat relname[20], int reclength, int attrcount, int reccount, int sortfield, char format) attrcat(int attrnum, int attroffset, int attrlength, char attrtype, char …

Member Avatar
Member Avatar
+1 forum 1

i am in a class and find C++ a challenge. i have an assignment and this is what i have so far. i need help, because i am not too analytical. #include <cstdlib> #include <ctime> #include <iostream> using std::cout; using std::endl; int main() { int (a, b); int (a * b ) = result; int result; srand( (unsigned)time( NULL ) ); //set seed to sys time for (int i = 1; i < 2; i++) { cout << 1 + rand() % (10 - 1 + 1)<< endl; cout << 1 + rand() % (10 - 1 + 1)<< endl;//how …

Member Avatar
Member Avatar
+0 forum 2

Hello . . I'm trying to get my random number generator to work but i'm having a tough time here's what i've written so far I can't seem to get the number generator to give me a truly random number . . . i'm sick of tooling with it and need a solution Also . . .when i get it to work , it always generates the same number. if I go through the game i've set up, and I guess the random number in 10 tries, it replays if you get it right . .but if you use up …

Member Avatar
Member Avatar
+0 forum 2

i dont think any one else has mentioned this here. but here is beginners guide to c++. it claims you dont need ANY experience have a look and see what you think [b][i][u][color=magenta][url="http://www.eliteproxy.com/cpp/tut/fabct/fab.html"]clickety-click[/url][/color][/u][/i][/b]

Member Avatar
Member Avatar
+1 forum 8

Please help me get the minimum in the following problem. i get everything else but the min. take a look at it. [color=blue]//************************************************** // Description : This program asks a user for five real numbers, then outputs // the number of data entries entered, the total of the numbers // entered, the mean average of the numbers entered, the minimum // and maximum value entered. it will also format the output to // one decimal place. //**************************************************[/color] [color=red]#include <iostream> #include <stdlib.h>[/color] [color=red]using namespace std;[/color] [color=red]int main(void) { double num, sum = 0, avg, max, min; int count = 0; // …

Member Avatar
Member Avatar
+0 forum 1

I am doing a program in C++ with do while loops and switch case. After the user enters the info required, the program automatically does the while part. It is not ejecuting the switch case (most important part in my program). What can I do?

Member Avatar
Member Avatar
+0 forum 1

Hi After getting great help with my first post here I thought I would try again. I need to create a (dynamic) number of objects of two types, eggs and fry. I then need to be able to delete the fry and then make a new group of fry objects with all the info from the members of the egg objects (i.e. the egg objects will become the new fry objects). the number of objects will vary so I cannot just over write the old values. I have some code that actually works, but as the program exits a Windows …

Member Avatar
Member Avatar
+0 forum 4

I'm writing a simple one window program with inputs and outputs in a GUI. My problem is that I don't know what program to use to make the graphics and then implement them into the window I am using. I just need to be able to make simple vector objects that I can control and minipulate. I've looked around and have gotten confused on what to use. Any help would be greatly appreciated.

Member Avatar
Member Avatar
+0 forum 6

Hi.. plz I need ur help.. I wrote my assignment & it runs but, not all statements can be executed I don't know why?? could u help me?? :sad: this is my code: #include <iostream.h> int check(char x){ if( x=='a'||x=='b'||x=='c'||x=='d'||x=='e'||x=='f'||x=='z' ) return 1; else return 0; } class CarADT{ private: float fuel, water, oil; int switchOn; int speed; public: CarADT(){ fuel = 100.0; water = 4.0; oil = 5.0; switchOn = speed = 0; } void Switch(){ switchOn = 1; cout<<"The car is switched ON\n"; } void setspeed(float s ){ speed = s; } void FillTank(){ fuel = 100.0; } …

Member Avatar
Member Avatar
+1 forum 4

Hi All, i have just started to look into picking up a bit of c++. i've been having a search about on the net for some tutorials and web links to help me learn but so far i havent really found much. can anyone out there drop me some links to good newbie resources on learning c++. if it helps i have a copy of MS visual studio 6.0, so anything to help me get a grip on how this environment works would be great, as well as codeing within it. cheers spikes

Member Avatar
Member Avatar
+1 forum 4

Hello C++ Guys, is it possible to make automatic frames for pictures on my web site with C++? Thank you very much for your help. Have a nice Christmas, Josef

Member Avatar
Member Avatar
+1 forum 8

i am currently making a game i am rushed and cant put much more. basics: im 14 and do not have company need good C++ programmers Need good graphics programmers for 3-d need good AI programmers i will post more later.........

Member Avatar
Member Avatar
+1 forum 37

Hello all, I will start off by saying Im in the dark with some aspects of C++, in an intro computer course at college. My question is about how to use char commands for when I have multiple users using the same segment of C++. ex. 3 users are asked to enter their height etc..... Im not sure how to go about the it for 3, 1 user is easy and I have no problem. Any thoughts or how to's would be appreciated Thanks Pete

Member Avatar
Member Avatar
+0 forum 5

What is the difference between function template & template function? Thanks.

Member Avatar
Member Avatar
+0 forum 1

Hello.I am having some problems with my vc++6 compiler.Here is the code: [CODE] #include <iostream.h> class SimpleCat { public: SimpleCat() { itsAge = 2; } // if I put the definition of the function into the daclaration,that becomes an "inline" function ~SimpleCat() { } // class destructor int GetAge() const { return itsAge;} void SetAge ( int age ) { itsAge = age;} private: int itsAge; }; // class declaration ends int main () { cout << " generally,to access data members and functions,\n"; cout << " we use the dot (.) operator...\n"; cout << "but here while accessing the …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am currently working on a program that compiles fine and runs OK to give some results. However, when I try to split the program into 3 parts, it it gives some weird compilation errors. Initially I had one program, calc.cpp that manipulates polynomials (adds/ subtract/multiply them). However when I split the program into three, polynomial.h, polynomial.cpp and calc.cpp I get complilation errors. Calc.cpp has polynomial.h included. Yet, when I call functions from polynomial.h it gives the following errors like it can't find the functions from polynomial.h. getpoly, add, compare, print are all functions in polynomial.h that I am …

Member Avatar
Member Avatar
+0 forum 1

[b]Last transmission from Starbase XY003 -- the galaxy's last out*post*[/b] [size=2][url="http://undergraduate.csse.uwa.edu.au/units/231.312/Clect1.pdf"][u][b][color=red]http://undergraduate.csse.uwa.edu.a....312/Clect1.pdf[/color][/b][/u][/url][/size] [size=2][url="http://www.teicontrols.com/notes/C_Programming/C_ProgrammingNotes.pdf"][u][b][color=red]http://www.teicontrols.com/notes/C_...ammingNotes.pdf[/color][/b][/u][/url][/size] [size=2][url="http://www.oucs.ox.ac.uk/documentation/userguides/c/l922.pdf"][u][b][color=red]http://www.oucs.ox.ac.uk/documentat...ides/c/l922.pdf[/color][/b][/u][/url][/size] [size=2][url="http://oscinfo.osc.edu/training/C/ccourse_fix.pdf"][u][b][color=red]http://oscinfo.osc.edu/training/C/ccourse_fix.pdf[/color][/b][/u][/url][/size] [size=2][url="http://ei.cs.vt.edu/%7Ecsei/project/sf/notes/cprog.pdf"][u][b][color=red]http://ei.cs.vt.edu/~csei/project/sf/notes/cprog.pdf[/color][/b][/u][/url][/size] [size=2][url="http://www.strath.ac.uk/IT/Docs/Ccourse/"][u][b][color=red]http://www.strath.ac.uk/IT/Docs/Ccourse/[/color][/b][/u][/url][/size] [size=2][url="http://www.cs.cf.ac.uk/Dave/C/CE.html"][u][b][color=red]http://www.cs.cf.ac.uk/Dave/C/CE.html[/color][/b][/u][/url][/size] [size=2][url="http://www.cprogramming.com/"][u][b][color=red]http://www.cprogramming.com/[/color][/b][/u][/url][/size] [size=2][url="http://www.eskimo.com/%7Escs/cclass/cclass.html"][u][b][color=red]http://www.eskimo.com/~scs/cclass/cclass.html[/color][/b][/u][/url][/size] [size=2][url="http://www.lysator.liu.se/c/"][u][b][color=red]http://www.lysator.liu.se/c/[/color][/b][/u][/url][/size] [size=2][url="http://www.eskimo.com/%7Escs/cclass/notes/top.html"][u][b][color=red]http://www.eskimo.com/~scs/cclass/notes/top.html[/color][/b][/u][/url] [b]Here are some compiler links:[/b] [/size][size=2] [size=2][url="http://www.gnu.org/software/gcc/gcc.html"][u][color=red]http://www.gnu.org/software/gcc/gcc.html [/color][/u][/url] [/size][/size] [size=2][size=2][url="http://www.delorie.com/djgpp/"][color=red]h[u]ttp://www.delorie.com/djgpp/[/url][/u] [/color][/size][/size] [size=2][size=2][url="http://http://users.cyberelectric.n...nkCompilers.htm"][color=red]h[u]ttp://http://users.cyberelectric.n...nkCompilers.htm[/url][/u] [/color] [/size][/size][size=2][size=2][url="http://http://www.willus.com/ccomp.shtml"][color=red]h[u]ttp://http://www.willus.com/ccomp.shtml[/url][/u][/color] [/size][/size] [size=2][b]Read the sig for a better understanding[/b] [/size] [B][edit] link colours changed. peterska2[/B]

Member Avatar
Member Avatar
+0 forum 2

[b]Working With C++ [/b]C++ syntax is the way which the code is arranged to form the language. Each computer language has its own unique syntax. For example, the syntax for adding two numbers may be different in one language than in another. Syntax is to programming as grammar is to literature. For the most part, C++ code is divided into expressions, statements, and declarations. Each of the three use different syntax which tell the computer that they are to be handled differently. [b]Declaration Statements[/b] Declaration statements are, simply put, used to declare variables. As in math, computer variables are letters …

Member Avatar
+0 forum 0

[b]OOP[/b] C++ is an object-oriented programming language. In other words, it contains what are known as objects, such as classes and structures, which allow the easy manipulation of large amounts of data. The easiest way to think of them are as records. [b]Creating Data Types[/b] When one creates a class, they are creating their own object type. For example, suppose one wants to write a program to manipulate student records. Each student record contains the student's age and phone number, suppose. This would be accomplished by writing a class named student which handles two variables: age and phone. Throughout the …

Member Avatar
+0 forum 0

How can you set the precision of a floating point value for output using the Console::Write method? In the past, with cout, you just used setprecision() but that doesn't seem to work with the Console functions.

Member Avatar
+0 forum 0

The End.