49,756 Topics

Member Avatar for
Member Avatar for TasostGreat

i'w wondering whether there is a difference between fstream and stdio.h when processing a file with these data [CODE] 10 10 P[/CODE] with fstream it's easier to get the data since with stdio.h i'd need to get every single char and number with getc() and translate i t into whole …

Member Avatar for TasostGreat
0
505
Member Avatar for krutthika

Hello sir, I am doing project on processors. I have a program called "START" and another program called "main". Now, i want to execute "START" program within the "main". I do not want to just call instead i want to run the "START" Program. please help me.. Thanku Krutthika

Member Avatar for iamthwee
0
223
Member Avatar for rob_l_f

Hi, I'm trying to grab all the input sent to cout to modify and redirect it. I used the example from [url]http://www.dreamincode.net/code/snippet2499.htm[/url], which works fine using the following code: [code] std::ofstream file_sink("encrypted.bin", std::ios_base::binary | std::ios_base::out); basic_xor_filter<char> filter(*(file_sink.rdbuf()), 0x7F); std::ostream output_stream(&filter); output_stream << "Hello World" << std::endl; output_stream.flush(); [/code] The class …

Member Avatar for jencas
0
97
Member Avatar for Marks256

Can someone please point me to a good windows api tutorial? The one that i found ([URL]http://www.winprog.org/tutorial/[/URL]) is nice, but it doesn't explain thing nearly enough. It kinda just drops the stuff on the person trying to "learn" it. I was able to follow through the first three sections, and …

Member Avatar for massivefermion
0
175
Member Avatar for VernonDozier

I am developing a program that creates random mazes. One part of the program involves keeping track of the correct path. Each point on the path is a (row, column) coordinate. I am trying to store each coordinate as a 2 element integer array and push it back onto a …

Member Avatar for VernonDozier
0
146
Member Avatar for winrawr

I'm trying to learn C++, and I thought I'd start by exploring classes, so I wrote this: [code=c++] #include<iostream> #include<string> using namespace std; class user { public: string logonName; string firstName; string lastName; int uID; }; int main(){ user users[2]; int i; users[0].logonName = "rawrMander"; users[0].firstName = "Rawr"; users[0].lastName = …

Member Avatar for Freaky_Chris
0
136
Member Avatar for bluebird

I would like to change the case of the string value. (lower case letter to upper case and upper case letters to lower case) I wrote my program as the following. But linux does not know strlwr and strupr functions. What should I do? [code] #include<iostream.h> #include<conio.h> #include<string.h> const int …

Member Avatar for bluebird
0
98
Member Avatar for marilou arceño

hi gUd dAy evEry 1 my name is Marilou C. Arceño, a BSIT stUdEnt whO's asking a cOde for add,sOrt and alsO a search for a recOrd!!!! using C++ please help mE for this cOdE!!! esp. in syntax!!! hoping fOr yOur rEspOnsEd!!!

Member Avatar for Salem
-2
31
Member Avatar for FrancisC07

hi! i have a problem.. i want to make a program the will input your name and age, and the output will count the char i been input. but my problem is i don't know what would be the code so that i can count the char i been input.. …

Member Avatar for FrancisC07
0
155
Member Avatar for Manutebecker

I want to create a battle system for an RPG game, one a little more robust then the previous one I made. This one I want to be very dynamic and easy to use. I want to use the Allegro API for it, but first I want to make sure …

Member Avatar for Manutebecker
0
155
Member Avatar for winrawr

Should I avoid casting between data types? I haven't really seen much about the use of this, but it seems like one of those last-minute-no-way-around kind of methods... but, for example, how would I use the length of a string in a for loop? The length property of a string …

Member Avatar for grumpier
0
167
Member Avatar for monkey_king

Hi, I was just wondering if adding debug symbols to my program, will slow down it's performance. I'm running linux. thanks in advance

Member Avatar for daviddoria
0
85
Member Avatar for Manutebecker

So I'm having trouble with classes today, I want to do something like [CODE] #include <iostream.h> using namespace std; class Dummy{ char Name[256]; void setName(char nam){Name=nam;} }; int main(){ char[256] temp; cout << "Name?\n"; cin >> temp; setName(temp); } [/CODE] I want something like this to store a char array …

Member Avatar for Manutebecker
0
8K
Member Avatar for CPPRULZ

I am getting errors that I have never seen before in a program that uses class englishweight with float number and float eng_weight to output number*englishweight and other things in the EW_driver.cpp. Here is what my build log looks like: ------ Build started: Project: assignment_2, Configuration: Debug Win32 ------1>Compiling...1>EW_Driver.cpp1>Linking...1>EW_Driver.obj : …

Member Avatar for StuXYZ
0
86
Member Avatar for VBNick

when a cursor key is pressed, WM_KEYDOWN is received, and when it is released, WM_KEYUP is received. How can I get this same functionality with a character key? I found the messages WM_CHAR and WM_DEADCHAR, but they dont work like the above messages. Can anyone help? Thanks, Nick

Member Avatar for VBNick
0
147
Member Avatar for winrawr

Can I do this? [code=c++] while(variable=functionCall()!=0){ /* ... */ } [/code] the function I'm calling, is returning a 3, but the variable in the while loop is equal to 1... I'm not sure what is happening in this statement, Originally I thought it would just always evaluate to true and …

Member Avatar for winrawr
0
117
Member Avatar for serhannn

Hello everybody, I have a paragraph containing many sentences and I need to extract a certain sentence, which contains a certain. I have no problem finding the word with my code but my question is, how can I extract the whole sentence? The code should work, regardless of the position …

Member Avatar for Comatose
0
158
Member Avatar for AdRock

I have a code snippet i've been working on but not getting very far. What I have is a text file which looks like an XML but i want to get the data between the tags and ignore the tags themselves. I want to count the number of data items …

Member Avatar for BevoX
0
156
Member Avatar for Freaky_Chris

OK, I've been looking at templates recently and eveything was fine...never had a problem with them at any point. But then when I decided to write a function that would either return the given template type or not. the following code explains what I mean.[code=cplusplus]template <class T> T find(char x, …

Member Avatar for Freaky_Chris
0
121
Member Avatar for tomtetlaw

Im on Windows XP pro. im using DarkGDK engine. I am making a FPS in a map that a tutorial provides. T tell it to load my object and position it under the camera and when i run it i look down and i can see it, but if I …

Member Avatar for tomtetlaw
0
96
Member Avatar for DevGeek

Hello all, i want to login to windows programmatically,if some one had done such kind of thing please do help me.i have authenticate the user with LogonUser() funciton of win32 api and have also placed my application to windows logon by replacing logonui.exe in system32 folder.but i am unable to …

0
89
Member Avatar for chococrack

I am having trouble finding out info regarding how to stop my application from "Beeping" every time I change focus with the "ENTER" key. For the sake of clarity here is the specific action and code which produces a sound (which I want to eliminate): I am simply trying to …

Member Avatar for chococrack
0
173
Member Avatar for besktrap

Hi everyone. I'm currently working on a Tic Tac Toe game, and I am having a little trouble with, well, I'm not even sure what to call them. They are a variable with brackets like so below. Anyway, I have this variable: [CODE]char Line_One[3] = { ' ', ' ', …

Member Avatar for VernonDozier
0
104
Member Avatar for Phil++

Hey, I am trying to create something like Lua but c++. What I want to do is create an Engine that calls a txt file and then outputs it in c++ so that I do not have to compile it every time and I can edit my source in notepad …

Member Avatar for u8sand
0
147
Member Avatar for Phil++

Hey, what I am trying to do is change the way people open text files in c++. What I want to do is: open("example.txt"); which will then open the text file "example.txt" and have a header file that displays like: [code] string line; ifstream file ("example.txt"); if (file.is_open()) { while …

Member Avatar for Phil++
0
142
Member Avatar for headedtomexico

So I've got this piece of software that is written in C++. I also have a website hosted on hostgator with linux server i believe. I have a MySQL database with usernames and passwords. What I want to happen is for my client application that is written in C++ to …

Member Avatar for headedtomexico
0
494
Member Avatar for guest7

Hi, I have a file output.txt as follows : c FILE c c c p val 25 36 8 1 0 -1 -8 0 -9 -7 0 -9 -2 0 7 2 9 0 -10 6 0 -10 8 0 -6 -8 10 0 -11 -9 0 -11 -3 0 …

Member Avatar for Comatose
0
521
Member Avatar for c++noobie

I am trying to overload operator++ for a type I have defined. Here' s a little explanation beforehand. I am working on a link_list class that can be used to create dynamic arrays of any type. I created a basic_link template to hold each element of the array. Each basic_link …

Member Avatar for c++noobie
0
274
Member Avatar for guest7

Hi, I wish to generate all the binary combinations for an input size n. So, the number of combinations in this case would be (2^n) and if n=2 my output should be : 00 01 10 11 How can i do it? What would be the best way? Thanks

Member Avatar for MosaicFuneral
0
355
Member Avatar for winrawr

Are there any reeeally good books on programming C++ that anyone knows of? Ones that just do an excellent job of teaching different techniques and clean coding practices, as well as things that can really be applied (like making and styling windows, communicating via TCP/IP, etc)?

Member Avatar for winrawr
0
111

The End.