General C++ Programming - November 2011 (Page 42)

Help with File I/O project (1,2)
 
I am trying to do a mad libs type of thing where I have a story(Story.dat) and other data files with the words (nouns.dat, verbs.dat, etc.). The words to be rap...
[38 replies] Last: Let's go biting in the hat !" said Avery. The tables jumped to the dog... (by RonTheMoron)
by icen
please me.I have problem programing c++, anyone can help me..please check content
 
1.Make a program to produce output like below! Input text: AB C output: * A * *A*B*A* * C ...
[8 replies] Last: It looks like a language problem, not a programming problem. :/ Icen, ... (by Arandur)
by Kyon
Befunge++
 
Heya, I got interested in esoteric languages again, so I decided to make a Befunge interpreter (with some extra features). First, I would have to build the inte...
[8 replies] Last: Thanks, that (and some fixes) did the trick! I'm now going to focus on... (by Kyon)
by AdumUp
Still having problems :(
 
Hi all! I posted in the beginners forum about two weeks ago about how I've been having issues with my IDE (Code::Blocks) or any others that I've tried to instal...
[4 replies] Last: ... I'm experiencing the uncontrollable urge to want kiss every inch o... (by AdumUp)
Ways of making this program better,
 
So for the past fifteen minutes i have been making this code #include <iostream> using namespace std; int main() { string name; int pass...
[11 replies] Last: Well, assorted suggestions from coding standards I've worked to... #... (by andywestken)
Need help overloading an operator
 
So im doing this assignment for my C++ class, and we have to sort objects based on a certain private data member. I have gotten it down to one error, and I cann...
[12 replies] Last: EDIT: Nevermind! It worked! Thank you guys so much. I realize now tha... (by moorecm)
How to input two words with space b/t??
 
My program runs fine. The only problem I have is when my program prompts for an animal name it wigs out when I enter two words... such as "Black Bear". I am try...
[2 replies] Last: I need to use a character array and be able to input/output multiple i... (by cstokes)
Please help with Mad Lib Pointer code problem
 
The issue is I need to use pointers to pass the variables to the function that tells the story. I've tried this every which way but obviously there is a way i ...
[4 replies] Last: Thank you Thank you Thank you!! once i made the changes you pointed ou... (by Sagar7777)
Linked List seg fault
 
I'm using a linked list as follows: typedef struct node* Link; struct node{ long dist; Link next; }; I have also defined the following funct...
[4 replies] Last: You are passing the Link to the init() by value so the assignment l =... (by closed account D80DSL3A)
Function returning reference --help
 
Hi, I'm very confused about how function returns refenrence: #include <iostream> using namespace std; double & GetWeeklyHours() { double h = 46.50; ...
[15 replies] Last: tnx to everyone so far... I'm marking this thread solved. (by codekiddy)
Syntax Question
 
#define foo(buf, data) *(buf)++ = (char)(data) Can someone help to explain the above syntax of the token string: *(buf)++ = (char)(data) ? It works b...
[1 reply] : The cast to char value of data is copied to the position buf poi... (by Caligulaminus)
please help!!!! i have a problem writing this program
 
this is the question for the program: 1) Query the user to find either the larger of 2 numbers or the largest of 3 numbers. 2) Use a ' switch ( ) ' struct...
[no replies]
Strange Print-outs
 
I have this program that won't print everything I tell it to. It's very strange. In the middle of the program I wrote: printf("MADE IT HERE!"); printf("Sa...
[8 replies] Last: I switched it back to printf and added a newline to see if that worked... (by James Grider)
struct containing string array without predefined size
 
I want to make a struct which, among others, contains an array of std::strings. But I don't want to define the size of this array in the struct definition, but ...
[2 replies] Last: Thanks for the fast answer. It works perfectly. (by CryptKeeper)
iso::app not working?
 
the No.1 ofstream button is the header, I want to append data next after every time I execute the program so I cannot put the header together, because it will d...
[1 reply] : In VS2008 it works perfect. Try change this: ofstream myMoneyHeader; ... (by Syuf)
by rucafe
deleting dynamic array
 
I have the following code: const float phantom_res = 500; const int depth = phantom_res; //x const int height = phantom_res; //y const int width = pha...
[1 reply] : a) Don't use system() commands. b) Can you show us the rest of the co... (by Gaminic)
by jorgen
mpfr functions as argument
 
I want to pass an mpfr functon as argument, in the following way: void func(int (*fu)(mpfr_t, mpfr_t, mpfr_rnd_t)) { mpfr_t m1, m2; mpfr_inits2(500...
[2 replies] Last: Oh ok, sorry (by jorgen)
by ljl16
Finding the 'firsy byte of the last character from a UTF-8 string'
 
Hi, I don't have a clue about programming (I'm a school teacher), it's just a friend bet that I couldn't resolve this algorithm problem with the internet. Le...
[2 replies] Last: Of course, he probably knows the answer, too. He just wanted to challe... (by ljl16)
by mrkhn
Create folders...
 
Hi all. Actually I'm using this code for creating folders: char buf ; DWORD dir = GetCurrentDirectory(MAX_PATH, buf); CString directory = buf...
[4 replies] Last: Thanks ;). (by mrkhn)
by jorgen
deleting equal pointers
 
So I'm passing a char pointer to a function which creates a char array, returning to main() and setting another char pointer equal to the first one. My question...
[3 replies] Last: jorgen , ' plain ' pointers can be dangerous to use. In your exampl... (by closed account 1vRz3TCk)
November 2011 Pages: 1... 4041424344... 47
  Archived months: [oct2011] [dec2011]

This is an archived page. To post a new message, go to the current page.