51,593 Topics

Member Avatar for
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
123
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
209
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
165
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
64
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
200
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
235
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
105
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
634
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
323
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
123
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
128
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
594
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
43
Member Avatar for populate

Hi Guys, After devloping couple of years and months........many projects in .NET framework.....using C# , VB.NET, and ASP.NET.........My personal vote goes to C#. No doubt I love to code in this languages. And I know many of you like so... So then whether VB.NET Programmer getting downward.....I can't say so,, …

Member Avatar for server_crash
0
157
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
156
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
286
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
189
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
148
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
147
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
150
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
808
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
135
Member Avatar for Electrohead

If you are an absolute beginner to C++, it is a good idea to grab some books from Amazon (that's what I did!) The first 2 books i bought were: C++ - A Beginner's Guide C++ For Dummies It is generally better to read the beginner's guide first, as it …

0
67
Member Avatar for aaron_tan

Anyone has any idea how to open a windows registry key using C++? from my understanding, there is a function in winreg.h that does this, RegOpenKeyEx and RegSetValueEx. But i cant seem to open the key with RegOpenKeyEx. When debugging, the debugger showed this error message "First-chance exception in Proj.exe …

Member Avatar for Dogtree
0
124
Member Avatar for f3tpy

Hi, I am just wondering how to remove particular *obj file from a given *lib file. Details: I am using C code in VC++6.0 compiler. I created project with few files (such as 1.c, 2.c, 3.c…etc.,). My project output is *.lib. I want to remove 1.c or 1.obj from *.lib. …

0
58
Member Avatar for CryingRaven

I have been a Delphi user for 8 years and now migrated to C++ and have found the changeover quite taxing indeed. I am using Visual Studio .NET and have before that used MSVC 3 and MSVC 6 and always had the same problem: I code my classes and methods …

Member Avatar for Dave Sinkula
0
329
Member Avatar for Joe Diamond

Hi, I'm working in C# Windows Forms, with an MDI system. My documents contain several different objects. I want those objects to be shown as dragable windows *inside* the document (MDI client) window, and to be part of that window (ie scroll with it, affect the scroll bars, etc). I've …

Member Avatar for Toulinwoek
0
126
Member Avatar for jagosa

Hi evrybody and thanks in Advance. I am programming with Borland C++ 5.02. I am trying to do a dialog where the user can choose a directory. I would need something like TOpenSaveDialog, but only with folders, not to have to choose a file. Thanks

Member Avatar for jagosa
0
66
Member Avatar for sandesh_daddi

hi, i want information about where i will get e-book for Registry API to chang or modify Registry from platform SDK in VC++. Is any one have book related with registry changer or registry handler through WINDOWS REGISTRY API please give me .

Member Avatar for Dogtree
0
76
Member Avatar for f3tpy
Member Avatar for amt_muk

Hi all, Can any one tell me how to delete any file from a C++ code. I can do it with the help of the function 'system()', but is there any other way? :?: :?: :?:

Member Avatar for amt_muk
0
89
Member Avatar for winbatch

Hi, In my never ending quest to improve my C++, I'm trying to write a class that sets and reads shared memory. For the time being I am avoiding dealing with issues of concurrency/locking, etc. and starting small. I was successfully able to put into shared memory things like integers, …

Member Avatar for Dogtree
0
511
Member Avatar for winbatch

Hi, After completing my Date class, I realize that I am suffering from the 2038 problem. (As described here-> [url="http://pw1.netcom.com/~rogermw/Y2038.html"]http://pw1.netcom.com/~rogermw/Y2038.html[/url]). Does anyone know which libraries (or which code) I need to switch to on *nix systems to overcome this? (I know windows has someting like mktime64 (instead of mktime). Google …

Member Avatar for Dogtree
0
258
Member Avatar for Electrohead

HI! I am new to programming (*although i know some html*) and I was wondering if someone could tell me what is wrong with my C++ area calculator? Thanks! [CODE]#include <iostream> using namespace std; int main (int argc, char **argv) { int height; int width; int area = height*width; cout …

Member Avatar for Electrohead
0
278
Member Avatar for madt

the values are not being passed correctly, in my constructor i copy the value of d to decimalNum and the value of b to base. when i run the program the values are 0. what am i doing wrong?: baseType::baseType(int b, int d) { base = b; decimalNum = d; …

Member Avatar for madt
0
92
Member Avatar for jure

Ive made a program in .sh that flushes urls with topic into standrard out, now i want to make that program do the same as a c++, please help any 1 basicly i need the program to "download" urls with matching topic from the site... :idea:

Member Avatar for c_raj
0
145
Member Avatar for numerouno543

Hello.. I wish to write a client program in C++ which will keep on sending a packet of info to a server on internet at regular intervals. As I am a newbie, i am not getting any idea how to do it.....Further, I would like to mention that the program …

Member Avatar for numerouno543
0
100
Member Avatar for feda

hi , i need function to calculate primitive root for prime q that if i choose prime number q then a which is primitive must satisfy that a%q ,(a pow 2 )%q , ...... (a pow i )%q = distinct integers betwwen 1 & q-1 that 1<i < q-1 and …

Member Avatar for murschech
0
212
Member Avatar for madt

write a recursive function to convert a number in decimal to a given base b, where b is between 2 and 36. so far converts between 2 and 16 what must be added to convert between 2 and 36? [code]#include <iostream> using namespace std; void toBase(int n, int base) { …

Member Avatar for Dogtree
-1
105
Member Avatar for skprasat

Any1 plz help me.im new to this site and a begineer of C.... this may be stupid ques to ask.. char msg1[20]="hello"; char msg2[20]="welcome"; char msg3[20]="goodnite"; can i store these three arrays in one sigle array....not in pointers. ie in..... char result[50]; i need the result like this.. output: hello …

Member Avatar for Dogtree
0
264
Member Avatar for TimC

Dear All. Basically I am having trouble passing my class object to myQueue. I know my Queue works as I had it working for Integers and Charachters but after approx 25hrs over 4 days I still can not get my Object to store in my Queue. Any and All help …

Member Avatar for winbatch
0
203
Member Avatar for ultimate_fusion

I am at uni doing computer science and interested in game programming. i just have a few questions . . . are most games programmed in C++? how long will it take to learn i mean to get good enough to do a game like dig dug (a classic man)? …

Member Avatar for amura97
0
187
Member Avatar for Rotak

[b]PLEASE FORGET THIS POST... The problem was located in the debugger, which is not able to handle several running threads of ThRead().[/b] [quote] I wrote a file-buffer using Borland C++ 4.x. The buffer is implemented as a thread, which fills itself automatically. I implemented a function, called GetChar() which returns …

0
72
Member Avatar for Acidburn

I'm wondering if i can create a program that reads texts file. In the text file is c++ code ... could that be compiled in the running exe? So basically you'll have somehting like this in this first file: [php] #include <iostream> #include <fstream> using namespace std; int main() { …

Member Avatar for xiaoyueer
0
106
Member Avatar for madt

i have the following for my operator overload [code]fraction fraction::operator+(const fraction& object)const { fraction temp; temp.a = a*object.b + b*object.a; temp.b = b * object.b; return temp; } fraction fraction::operator-(const fraction& object) const { fraction temp; temp.a = a*object.b - b*object.a; temp.b = b * object.b; return temp; } fraction …

Member Avatar for Dave Sinkula
0
260
Member Avatar for Electrohead

Hi again, I have started to make an angle calculator using C++ but i am struggling. How would i recieve a command from the user to open a help screen?? Help would be appreciated, thanks!

0
98
Member Avatar for hazzo

My Program : [code]#include <iostream> #include <string> using namespace std; void Reverse(string &InputString); void CharSwap(char& First, char& Second); void main(void) { string InputString; cout << "Please enter the string to reverse ==> "; getline(cin, InputString); cout << endl << "You entered the (" << InputString.length() << ") char long string: …

Member Avatar for vegaseat
0
127
Member Avatar for indianscorpion2

hi i am a student of computer science.i am learning the c programming language.we spend all our time writing programs which tells itself a secret like adding numbers,kid stuff etc. i want to know the real thing.can anyone tell me what are the real time applications of C.?

Member Avatar for letmec
0
184
Member Avatar for JoBe

Hello ladies and gents, Ive got a question concerning how to actually send a program to someone (only the exe.file) so that he/she sees what the program can do without having the possibility to alter anything towards the code itself? I'm using Microsoft Visual C++ 6.0 incase you need to …

Member Avatar for winbatch
0
118

The End.