General C++ Programming - November 2012 (Page 26)

Simple CGI
 
My code works but with the html form sends the data to the c++ program it outputs input1= and then the value. How do i get it to output just the value? header ...
[1 reply] : you can see what's happening here www.rjmlocal.com , surely this is so... (by t2nator)
Can't get apply_discount function to work properly.
 
In my function definitions under apply_discount, when I enter a 1 or 2 for the discountQues to see if the customer has a coupon, the program thinks I'm entering...
[4 replies] Last: Ok. I can remove the 2nd while loop and leave it as an "if" statement.... (by andigirlsc)
How to use and format strfilter?
 
Hello everyone, currently i am working on a C language program that creates a random string of character and i put them in an array, and my second array has a u...
[no replies]
Book: C++ Primer / C++ Primer Plus
 
Hey everyone, I am looking for a good book for an intermediate programmer that just got into c / c++. i understand OO concepts and programming fairly well and ...
[2 replies] Last: The definitive post on C++ books is the one on SO: http://stackoverflo... (by Cubbi)
area of an arbitrary triangle
 
The area of an arbitrary triangle can be computed using the formula: area = sqrt s(s-a)(s-b)s(-c) where a, b, and c are the lengths of the sides, and s is the...
[8 replies] Last: You use the "<>" button to the right of the edit window to add the tag... (by MikeyBoy)
How can I get 4 bytes per reading in a file
 
This is a C program: I have a binary file and I need to read 4 bytes per reading and store it as type long. I tried fgetc, I did 4 fgetc which I stored in an...
[5 replies] Last: crashing mean an exception. add a try...catch block around fread funct... (by majidkamali1370)
Aligning Text in fout code
 
I am trying to output this data to a text file and the data outputs correctly however I am trying to align the 3 "Average" phrases underneath "Program", "Test",...
[no replies]
by tanny
Unable to compile, assistance needed (1,2)
 
========================== Line2D.h ========================== #include <iostream> #include <string> #include <fstream> #include <math.h> #include "Poi...
[31 replies] Last: Include guards stop you accidentally including the body of a header fi... (by MikeyBoy)
Character testing help
 
How to check if the characters before @ are part of the alphabet. So if you have something like this: char a ; cout <<"Enter you email:"; cin.getline(a...
[4 replies] Last: bump? (by Sunny101)
by na7937
Nested For Loops
 
How do you format this as a nested for loop? 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1
[9 replies] Last: Thank you all this was very helpful! (by na7937)
I'm trying to write a craps simulator for my homework and I keep getting a NaN or inf error in my output.
 
Here's my source code #include <time.h> #include <iostream> #include <cstdlib> #include <iomanip> using namespace std; int playagain; float getbalance() { flo...
[8 replies] Last: THANK YOU SO MUCH! You're my favorite internet stranger right now. (by frustratedstudent)
Having trouble reading/writing to text file with my class object
 
I have a project for my data structure class, and on of the things I have to add to my class is a read and write function. I need to be able to read from a text...
[1 reply] : Anybody? Need help reading and writing from ostream/istream. (by mothergoose729)
Game Of Life
 
I came up with this code to simulate Conway's Game of Life. But somehow the output is unexpected. Please suggest corrections. #include<iostream.h> #include<...
[3 replies] Last: Try running this and let me know if this is what you expect. I change... (by Kart)
by Nausea
Passing pointer, getting wrong addres, how is this possible?
 
I´m going insane here. I´m passing a pointer into a function and somehow the address that arrives into the function is wrong. How is this possible? Driving me...
[17 replies] Last: Ok I will show you the important parts of the classes then: class C_... (by Nausea)
commenting a function
 
hey guys is it possible to comment a function in a way, that if you use(=write) it you get additional info about the functions parameters in the code complet...
[no replies]
How to find the four lowest numbers
 
thx
[7 replies] Last: thx for OP Moschops, i knew there was something about 4 lowest numbers... (by IronmanCro)
fork() and getpid()
 
can i use fork() and getpid() functions in a console application in windows XP to creat child process if yes then why the following code is not working.If no,th...
[3 replies] Last: @ Moschops and @ kwb - Thanx :) (by Pter0dactyl)
SIMPLE Dynamic char array
 
I am trying to get user input and create an array with the length of char entered. Instead of: const int MAX = 3000; char msg ; cout << "Enter ...
[2 replies] Last: @Moschops I think the purpose is not to ask the user how many characte... (by LB)
Code Graph Call Stack
 
After Some search on google I found one tool that creates flow chart and Call function from source code. I checked out demo of this tool, name of this tools is...
[no replies]
by Ebo
Save/Write to a file
 
I have written this program and I would like to save/write to a file but the weights and values are not being written to the file. Can I get some help? Thanks! ...
[1 reply] : next time use code tags http://www.cplusplus.com/doc/tutorial/files/ ... (by Darkmaster)
November 2012 Pages: 1... 2425262728... 51
  Archived months: [oct2012] [dec2012]

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