49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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: … | |
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] | |
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]) … | |
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. | |
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 … | |
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 … | |
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; … | |
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* … | |
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 … | |
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, … | |
[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 … | |
i want to know the programming code which converts roman numerals to integer numerals. | |
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 … | |
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 << … | |
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 … | |
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 … | |
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: … | |
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... … | |
Print all the pairs of prime numbers which is equal to the sum of the given no. entered by user. | |
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 … | |
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 … | |
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 … | |
/* 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 */ … | |
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 … | |
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 … |
The End.