General C++ Programming - February 2013 (Page 14)

by jehudi
using sentinela to read from file HELP!!
 
Hi, I have an assignment of reading from a file and using the sentineala int -1 to stop, add the 0 and 1 on different variables and then continue reading. EX...
[1 reply] : Your logic makes no sense. All the stuff inside the while loop will o... (by MikeyBoy)
how to search in c++
 
my professor ask me to create a program on which i can display all the details of the book from book inventory that i recently made. But the hardest part is, i ...
[3 replies] Last: comboBox? or is this just a console application (by Darkmaster)
Relative grading
 
#include<iostream.h> #include<stdio.h> #include<math.h> #include<string.h> struct student_record { char name ; int roll_no; int marks; char grade...
[1 reply] : please use variables with a name, not just single letters. no one will... (by Darkmaster)
std::ios_base::failbit and output streams
 
Does it make sense to set std::ios_base::failbit to throw exceptions, for output streams? As in: std::ofstream output_file("out.txt"); output_file.exce...
[5 replies] Last: > "when is the fail bit set for output streams, but the bad bit isn't... (by JLBorges)
functionname in braces (??)
 
Hi Guys, i want to know, whats the mention of that construction (C programming): void (luaL_register) (lua_State *L, const char *libname, ...
[3 replies] Last: OK, thx for the reply (by trialanderror usually)
How to allow user input to exit the program?
 
I need to create a command where the user inputs a character and it'll exit out the program rather than executing any of the other code. For example : If...
[2 replies] Last: Thanks! (by jaywalls)
Making an array bigger? Resizing?
 
As part of class project I'm working with the following code... Item.h #ifndef ITEMH #define ITEMH #include <iostream> #include <sstream> #include <str...
[5 replies] Last: update on my code. Any comments will be very much appreciated! contain... (by eibarra)
by sky123
Please help me with code
 
Hi, so I'm having trouble with my program that validates a user's password can you please help me? this are the problems im having so far: I keep getting stro...
[1 reply] : You should listen to your compiler: http://liveworkspace.org/code/1CVP... (by closed account S6k9GNh0)
Debbuging help! Any help appreciated!
 
//we have to use multiple files for this, this is Seller3.cpp #include <iostream> #include <iomanip> #include <cstring> #include "Seller3.h" using std::cout;...
[1 reply] : Line 33: You're trying to return a const char * in a function that ... (by AbstractionAnon)
Need help on if else problem.
 
Write a program that calculates a customer’s monthly bill. It should ask which package the customer has purchased and how many hours were used. It should then...
[8 replies] Last: i figured it out, had to use another if statement rather than else and... (by jaywalls)
please help
 
hey everybody i have a home work i try to solve it .... but i lose can any one one here help me ..... note : i'm at my first year at unversity .... please h...
[3 replies] Last: I found 2 links I wanted to share http://www.cplusplus.com/forum/arti... (by SamuelAdams)
by Dude22
Help with a program to resize an image
 
Hi Everyone, I am currently working on problem set 4 for Harvard’s online CS50 course. I am working on a program that resizes a bmp image by a factor of N....
[no replies]
Infix to Postfix Segmentation Fault! Help Appreciated!
 
The code compiles and works for the most part . . . but when the user inputs "3 + 4" as opposed to "3+4" the program results in a segmentation fault. Where did ...
[no replies]
Simon Colors Game advice
 
Right now it's just system("CLS"); and keyboard button pressing. Does anyone know how to make like a little circle with 4 lights and the ability to click? ma...
[2 replies] Last: Nice, I am now making buttons for the box. (by greenleaf800073)
Trying to freeze file(?)
 
HI ALL, excuse, i want know!, how can freeze file (like:DeepFreeze) on my PC, JUST ONE FILE. not ALL Files. ... i mean what API or function to do th...
[3 replies] Last: Yeah, on Windows you can just browse open handles and close them at wi... (by LB)
What other languages besides C++ compile and link straight in to executable files, or flat binaries?
 
I am wondering, besides C and C++, are there any other HLL that can compile and link to OS specific executable images, or flat binaries? Thanks.
[3 replies] Last: I know there are a few projects going on involving OpenGL in Haskell. ... (by sysopfb)
Calling a function with a dynamically defined name
 
Is there a way to call a function whose name is defined in a file-stored-list? In other words: The caller doesn't know in compile time the name of the functi...
[2 replies] Last: JLBorges Many thanks for your speedy answer. It solved my problem (by AlfredoG)
Dice program Beginner in need of help
 
I'm having a problem adding up the values of the dice rolls in a while loop. The program will only store the last value so how would I get it to store multiples...
[7 replies] Last: Oh ok thank you. That fixed my problem. Setting it to 0 before everyth... (by nheath12)
mouse or keyboard interface in home menu of console app
 
how can i design an console app such that its menu's options are used by mouse or get highlighted and enterable by using arrow keys of keyboard???
[4 replies] Last: well you dont need a gui... im writing a program right now in ncurses ... (by closed account Dy7SLyTq)
Problem with Header files
 
Currently, i'm running Code::Blocks for my compiler. Whenever I create a new class, a .cpp and a .h are created, along with the data from the main file. Main...
[4 replies] Last: Thanks, added code tags and used a .hpp extention, and it worked. (by JohnsonDaryian)
February 2013 Pages: 1... 1213141516... 43
  Archived months: [jan2013] [mar2013]

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