48,986 Topics
| |
I am trying to write a template function that attempts to convert anything into a long. .h [code] class General { public: static void delay( int seconds ); template <typename Generic> static long ToLong( Generic source ); template <typename Generic> static double ToDouble( Generic source ); template <typename Generic> static … | |
Now we are doing pseudocode and looping.On my assignment I believe i should do a sentinel controlled loop? But i really don't know.It says this: Develop an MC++ application that will determine if a department store customer has exceeded the limit on a charge account.For each customer,the following facts are … | |
Winbatch, I have another Q for you. I have the whole project compiling but I am stuck with displaying all the Customer details from the Q. I can pass the Class Object "Tim" to the Queue with various details but I need to write these to a file when I … | |
Hi All I am relatively new to the C++ world . Facing some problem , while initializing an array of objects . Suppose i have a class Rectangle . I want to have a pointer to an array of objects to the class . How do i invoke the Class … | |
Hi there everyone. I was hoping you guys could help me out again. I would like to write a setting to a certain line in a textdocument, for example "4000" at line 5 of the document. So far i have this: [CODE]void MainSettings::setSettingsToFile(String *numChannels, String *savePath, String *playlistPath) // Here … | |
hay i need to build a simple program in C# or C++ about robot that need to find the short and optimal way from one point to other on ground that have just 3 obstacle that look like rectangle or 2 rectangles connected . how can i insert in AI … | |
this is an example of what is happening consider the program: #include<iostream.h> void main(void) { double x=2.3767553235; cout<<x<<endl; } when i compile it the output is only giving 2.37676 Why? I dont want only 5 decimal places,plz someone tell me why is this happening. i want it to be say … | |
Hi All, I am facing a problem with new line character (\n). When I am initializing a string variable with a string having a new line character, e.g., [code] char str[20] = “Programming is \nfun | |
Hi everyone, i am a student of IT and i am trying to read a text file and load it into a records of nested structs. I understand the logic how to do it, but i had a few problems. the txt. file contains : [code]John Smith 125 2004 Daily … | |
I have copied this program from this site, and simply copied as a new C++ file but when run I got a number of error. so I included Myheader file which amongs other includes, the iostream.h, and stlib.h, that is why they have been commented out below. Any way doing … | |
hello, how to get a Local network domainNames and computernames using vc++ in win32API | |
Hello... Can someone please tell me how to send a DNS query through a C/C++ program ?? Regards. | |
Dear ones, I am new to network programming in c++ i need a guidlines or source code to output a "tree" where the root nodes are Workgroups or Domains on the network and the child nodes are the computers which are part of each domain plz help me ..its urgent | |
Can someone please help me on how to do the conversion of char to int using either a c-style cast or function-style cast. I have include my code. [code]#include <iostream> using namespace std; int main() { char state; cout << "Please select one of the following state abbreviations:\n"; cout << … | |
I may not be asking this question right... Basically, I have a wrapper around an stl map. I would like to use either a map or a hash_map based on whether the user wants the items sorted or not. To achieve this, I wanted to have a pointer to the … | |
Are they the same? If so, which one is preferred by the more advance programmer and why? Thanks, Scott | |
i'm trying to use getline to read from a file into a std::string and when i give it the normal 2 parameters (my ifstream and the string) the compiler says it wants 3 arguments , but when i give it 3 it says it wants 2 arguments. this makes absolutly … | |
Ok hey, I have this program and i dont understand how Its not wiorking. Thx for your time. :o [CODE]#include <allegro.h> #include <stdio.h> #include <stdlib.h> #include <time.h> void main() { int x,y,bx,by,af,al,ar,ab; allegro_init(); install_keyboard(); install_timer(); set_color_depth(16); set_gfx_mode(GFX_AUTODETECT,800,600,0,0); BITMAP *buffer, *back, *a, *b, *c, *d, *e, *f, *g, *h; back=load_bitmap("back.bmp",0); a=load_bitmap("gob-front-1.bmp",0); … | |
Hello everybody, This one for those who like graphics programming with C. Can any one of you tell me how to make stand alone graphics exe through C. i have read a paragraph on this topic but its not happenning. It will very nice of you if you code simple … | |
Any ideas on ways to improve it? I am new to C++, well programming in general. Thanks in advance. BJ [CODE]#include <cstdlib> #include <iostream> using namespace std; int c = 0; char p; int g =0; int n = 0; void D4(int A, int B); int main() { cout<<"Dice emulator … | |
Hello ladies and gents, Wanted to make this part of an exercise in wich I enter each time two integers into an array for wich I have to use STL container vector. Ive got this sofar, but getting an error message when I entered two numbers and the exe shuts … | |
Hi! 1st - sorry for my english... 2nd- can you help me? I have to draw a house in C++ using inheritance, virtual functions... I've done Rectangle, Circle, Line, Dot classes derived from the Shape class, but I don't know how to make the window and put the house there... … | |
Hello everyone, I recently wrote a very large program in Borland C++ (version 4) that implements a lot of linked lists. For many reasons I am now obliged to migrate to Dev C++, but when I run my software I get a "Access violation (segmentation fault)" error. This happens whenever … | |
gl\glaux.h: No such file or directory. i get the error above when trying to compile any code with #include <gl\glaux.h> in it??? | |
Hi all, I'm completly useless at C++ and was wondering if anyone can tell me how to tell a program that when I have pressed Enter, if the string is empty do nothing. Its for updating details. I'm using an Input header file that my lecturer wrote. This works fine … | |
Hello, I'm new to VC++7 and openGL but have luckily gotten some basics down and am ready to show off what i know to some friends. What I tried doing, is to simply zip the .exe, but this failed. My friends and I all play quake 3, which uses opengl, … | |
Can anyone tell me if there's any standard package for C++ to work with regular expression, or I will have to get some third-party package? | |
<< moderator edit: split thread from [thread=8544]here[/thread] >> i've found that somehow cin has a '\n' by default and you should use cin.ignore() to clear the input stream. hope this helps. :idea: | |
Hi, I was wondering if anyone has encountered this problem. I'm using Win32 API calls FirstFile() and FindNextFile() to search for files on my computer. The problem is, both function calls seem to return extra files that aren't part of my search string. Has anyone else experienced the same problem? … | |
hi could someone help me . Exist some function in c or c++ or visul c++ to do a conversion from ASCII character in decimal number??? please help me thanks in advance |
The End.