48,986 Topics

Member Avatar for
Member Avatar for winbatch

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 …

Member Avatar for winbatch
0
181
Member Avatar for white_eyez

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 …

Member Avatar for Dave Sinkula
0
78
Member Avatar for TimC

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 …

Member Avatar for winbatch
0
138
Member Avatar for gpta_varun

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 …

Member Avatar for gpta_varun
0
7K
Member Avatar for Greenthumb

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 …

Member Avatar for Dogtree
0
212
Member Avatar for student113

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 …

Member Avatar for Dani
0
161
Member Avatar for maherddd

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 …

Member Avatar for Dogtree
0
458
Member Avatar for amt_muk

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

Member Avatar for Dave Sinkula
0
97
Member Avatar for floyd

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 …

Member Avatar for Dave Sinkula
0
120
Member Avatar for nike123

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 …

Member Avatar for nike123
0
205
Member Avatar for pradeepcd
0
77
Member Avatar for numerouno543

Hello... Can someone please tell me how to send a DNS query through a C/C++ program ?? Regards.

Member Avatar for numerouno543
0
154
Member Avatar for pradeepcd

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

-1
62
Member Avatar for somer2412

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 << …

Member Avatar for Dave Sinkula
0
195
Member Avatar for winbatch

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 …

Member Avatar for Dogtree
0
228
Member Avatar for cscotty

Are they the same? If so, which one is preferred by the more advance programmer and why? Thanks, Scott

Member Avatar for Dogtree
0
100
Member Avatar for nasaiya

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 …

Member Avatar for nasaiya
0
615
Member Avatar for Zackery

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); …

Member Avatar for Dogtree
0
282
Member Avatar for letmec

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 …

Member Avatar for Asif_NSU
0
119
Member Avatar for Marack

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 …

Member Avatar for andor
0
123
Member Avatar for JoBe

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 …

Member Avatar for JoBe
0
577
Member Avatar for Alexutza

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... …

0
42
Member Avatar for amura97

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 …

Member Avatar for typek
0
150
Member Avatar for ultimate_fusion

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???

Member Avatar for typek
0
282
Member Avatar for evil_dude_01

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 …

Member Avatar for evil_dude_01
0
186
Member Avatar for xplicit

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, …

Member Avatar for xplicit
0
145
Member Avatar for Asif_NSU

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?

Member Avatar for Dogtree
0
142
Member Avatar for dragonray

<< 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:

Member Avatar for Dogtree
0
147
Member Avatar for bronzefury

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? …

Member Avatar for bronzefury
0
802
Member Avatar for gimmy

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

Member Avatar for Dave Sinkula
0
133

The End.