49,761 Topics

Member Avatar for
Member Avatar for PDB1982

How do I get this output to a file.....I can get it to print on the screen, but I can't figure it out for the life of me.... [code] #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; void abc(ifstream&); void main() { ifstream inFile; ofstream outFile; double …

Member Avatar for DavidB
0
210
Member Avatar for aznballerlee

I'm also working on a game project, and I'm stuck. I guess I'll have to post the specs so you guys can see what I have to do. Here are the specs: [quote] The valley floor can be viewed as a 10 by 10 grid. The northwest corner (upper left …

Member Avatar for zuser
0
171
Member Avatar for birdhouse

Hello I need to write a c++ program that requires a function called DeleteRepeat and prompts the user to input the name of a text file and outputs the new data in a new file. For example, the content of the text file that the user inputs is " b …

Member Avatar for basketball4567
1
114
Member Avatar for yatman

I have a file reg.txt which has 32 bit binary values like below 00000000000000000000000000001000 00000000000000000000010100100000 00000000000000000010000000000000 00000000000000000000000000000000 00000001000000000001000010010000 00000000010001000010000100100100 00000000001001000100010000000000 is there a way to read the 32bit binary value and store in an int?

Member Avatar for donaldw
0
382
Member Avatar for power_computer

I need a bit of clarifaction here. When you allocate memory in a dynamic memory it is depending on however you decide to increment your max of your array, so if my objective was to delete a single object in the array I would do the same as a static …

Member Avatar for power_computer
0
105
Member Avatar for Jfunch

i keep getting these errors with my program and i was wondering if anyone can help. /tmp/cc2Rxau2.o: In function `main': prac.cpp:(.text+0x101): undefined reference to `Barcode::Barcode()' collect2: ld returned 1 exit status Code: #include <iostream> using namespace std; class Barcode { public: Barcode(int zipcode); Barcode(char bar); Barcode(); int convert(int num); private: …

Member Avatar for jonsca
1
92
Member Avatar for tkud

Hey,everyone... I am having a hard time sitting in front of my pc and learning templates all by myself... I need help, in any form(explanations, examples,online help,etc). Please,any help will be appreciated..Thanks!! [QUOTE]"Show me your code and I will tell you who you are.."-Tkud[/QUOTE]

Member Avatar for mrnutty
1
81
Member Avatar for power_computer

For the life of me I cant figure out this simple task I know with a static array you just simple shift over one element and decrease the size in variable pertaining the length of the array as such [code] for(i = 0; i < n; i++) if(key == array[i]) …

Member Avatar for power_computer
0
3K
Member Avatar for ge6a93

When I use OnTimer() in Visual C++ 6.0 using MFC Library the application screen starts blinking(flashing). Is there any solution about this problem? Thanks.

Member Avatar for ge6a93
0
104
Member Avatar for power_computer

I have a linked list containing the following data struct node { string name; int hours; node* next; } I have all function I've made so far working, adding indiviual node, deleting node, printing data in nodes, Ive made the program to read from a file upon execution to create …

Member Avatar for power_computer
2
1K
Member Avatar for godsgift2dagame

Hey guys, I'm struggling with yet another problem. The goal is to run 1000 "draws" of three numbers but the catch is, the three numbers can't be repeating. So, no 4 1 4 or 7 7 7 or 8 1 8 and so on and so forth. Every line of …

Member Avatar for godsgift2dagame
0
99
Member Avatar for richman0829

Hi - I'm having a problem converting a couple of things that work fine spelled out in function main, but not when I try to define them as functions. One is a process of filling in a one-dimensional array. I'd like to just be able to say "here's the array; …

Member Avatar for richman0829
0
150
Member Avatar for Deadmon

Hello all, I have a small question here. Let's say I want to tokenize a string(or multiple strings) from input. For example, my input file has the following: 1 2 3 And this is my tokenizing code: [CODE] char line[256]; vector < char *>tokenize(FILE * in) { vector <char*>tlist; char* …

0
56
Member Avatar for debasishgang7

hi. i have a very basic problem in c++.. i use Microsoft visual c++ 2008. in many prog code i can see that there are many header file which are not included in MSVC++ library. and obviously error ocr. how can i get these library(.h) files and how to install …

1
79
Member Avatar for Icebone1000

First..Im very beginner with winsock and network programing.. Im doing a simple app that can act or as server or as client. What Im doing is that I open the app twice in the same computer, in one I choose server, and in the other client. With the server part, …

Member Avatar for lashatt2
0
831
Member Avatar for hla3mi

[CODE]#include <iostream> #include <string> using namespace std; struct Employee { //Data string name; int id; string residance; int salary; }; class Node { public: // Data Employee data; // The Next Pointer Node * next; // Constructor Node(Employee Object ,Node * ptr = NULL ); }; class List { int …

Member Avatar for hla3mi
0
190
Member Avatar for anurag814

i want to know the programming code which converts roman numerals to integer numerals.

Member Avatar for VernonDozier
0
47
Member Avatar for Wong23

I am given the class definition of stack and queue classes where I have to write a templated function called reverseQueue(?) that takes a pointer to queue as a parameter and uses stack object to reverse the given queue. The function call to reverseQueue should reverse the data of the …

2
227
Member Avatar for number87

hi I wanna find out the number of integers from an input number. For example if i enter 84075, the output should be 5. this is what i came up with.....im new to c++ still>.< [code=cpp]#include <iostream> using namespace std; int main() { int numCount, number; bool integer; cout << …

Member Avatar for taepodong1101
0
198
Member Avatar for mevkurray

hi all using ubuntu here, and the default setup (straight from synaptic) of wxwidgets has the wxDB classes disabled. so, how does one rebuild the actual libraries of wxwigets, once ive edited the setup.h files. and which setup.h files do i need to edit. i found what i was looking …

Member Avatar for mevkurray
0
189
Member Avatar for thelamb

Hello all, I have a VB.net application and a C++ DLL. The C++ DLL has an exported function that gets called by the VB.net application. The C++ exported function is as following: [CODE=cpp] STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); TR::Log( "Starting …

Member Avatar for thelamb
0
2K
Member Avatar for red999

So I am creating a program for a class that reads in from a file the appointments. The file has this format Date,Subject,Start Time,End Time,Location,, The interesting thing about the file is that it does not contain the same appointment (same name, location, and time) more than once. For example: …

Member Avatar for red999
1
98
Member Avatar for jonathanYoung

hello; i've been programming with c++ for about 2 months, BRAND new at this, im currently making a text based RPG for one of my programming classes. im having trouble with a error that comes up, and no one in my class can find out what exactly is the problem... …

Member Avatar for jonathanYoung
0
106
Member Avatar for Ashishinani1756

Print all the pairs of prime numbers which is equal to the sum of the given no. entered by user.

Member Avatar for donaldw
0
91
Member Avatar for Lukezzz

I am looking for a way to find the first occurence of: " " when searching backwards in String1 with beginning at index where # was found. However with LastIndexOf, this will find the Last occurence of " ". How can I find the first occurence of " " wich …

Member Avatar for thines01
0
121
Member Avatar for wyett

So, I'm working on a fraction calculator to add, subtract, divide and multiply. Currently on the part where it's asking for the user to input their fractions. My professor states this on the assignment sheet: "A valid sign will be ‘+’ or '-', a valid whole part or numerator will …

Member Avatar for jonsca
0
89
Member Avatar for combustion

Hello, I'm new to c++ and I am trying to convert a bruteforce program from Python to c++. Here is what I have so far: [CODE=c++] #include <iostream> #include <string> using namespace std; char chars[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; string t; cout << "Enter a string: " << endl; cin >> t; void checkPassword(string …

Member Avatar for Ancient Dragon
0
258
Member Avatar for hmpargi

/* What: Instant Insanity Game source in Turbo C. GPL(C) ======================= Col1 Col4*4 3 3 3 3 Row1 405 405 405 405 Row2 1 1 1 1 Row3 2 2 2 2 Row4 ======================= c:\mosh\games>tcc -If:\tcc30\include -Lf:\tcc30\lib instanti.cpp */ #include "cubeinit.cpp" int cube[4][6]; /* four cubes with six faces */ …

-2
70
Member Avatar for whouton

Hi guys, I'm trying to make a function that allows the user to enter in a file name and access that file; if the file name is wrong or the file is not there, I want to allow the user to enter in another file name. For some reason the …

0
76
Member Avatar for Philly0494

Okay, so I have to execute a batch command on a restricted user's account, however the batch command will not work unless the process has Administrative Privileges. currently i call the batch command via [CODE]system("command here");[/CODE] I, as the programmer, know the Administrator user/password on the WinXP machine this is …

Member Avatar for Ancient Dragon
1
106

The End.