General C++ Programming - March 2014 (Page 20)

still need help asap ,program runs twice, dont know how to stop the loop
 
i think my program is running twice , im not sure why , in my data file i have "2" and my result is "Your total is 4" why is my program running twice even thou...
[3 replies] Last: so if you want to read an entire line you need to use getline and stri... (by coder777)
How to check for eof() without getline?
 
I'm currently trying to write a while loop that checks if the text file has read all the contents inside. I've tried using while(!in.eof()) but as usual...
[9 replies] Last: Very interesting, that is a really good use of the comma operator. Tha... (by Valandu)
by csharp
Please help
 
what is wrong with my code I am getting these errors Error 1 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStar...
[2 replies] Last: It probably has to do with the fact that you selected to create a win3... (by xismn)
A compile error of usage of "#if"
 
Here is the code I wrote: #include <stdio.h> #include <stdlib.h> #include <string.h> #define MY_CONTENT "123hello123" #define SEARCH(TARGET, CONTENT...
[7 replies] Last: @Luc Lieber Do you have any material or link about the "meta-flow-co... (by jelllove)
by bads
help me change the color of piece in tetris
 
void SetupPieces() { pieces = Piece(Bads(0,2), Bads(0,1), Bads(0,0), Bads(0,-1)); pieces = Piece(Bads(0,0), Bads(0,1), Bads(1,0), Bads(1,1)); ...
[7 replies] Last: i get it by x and y Cartesian plain (by bads)
Compare 2 dates from strings,char* or int
 
i have a problem here, i have been trying to compare a date format from SYSTEMTIME and a date from a text file(string).But its not working. I tried to change bo...
[2 replies] Last: yes, i tried changing it to (szcurrentDate == str) and that worked... (by kakashisenpai)
Need Help on Using cin With Arrays
 
Hey, this is my first post on this forum so I'm not exactly sure how to format the code (or whether this is the right place to post, but I think it is...) If I...
[2 replies] Last: Use >> on line 23 and 24 instead of <<. (by Stephanie16)
Memory Leak issue
 
Hello guys. Appearantly my program has an issue with memory leak but I can't really find it, im not too much of an expert but these all seem just fine to me. A...
[3 replies] Last: $ valgrind --leak-check=full ./a.out ==2719== HEAP SUMMARY: ==2719==... (by ne555)
need help trying to pass a class object by reference by reference
 
hello all, I'm trying to pass a class object by reference. total = mathfunction(i); } double mathfunction(retirement& j) { double R = 0.00,...
[1 reply] : Perhaps you meant [code firstline=14]R = j.getdollars(); m = j.getdepo... (by long double main)
Depth First & Breadth First Search Program
 
This is what i have so far, i have the areas commented where I need help im not sure how to have to user input numbers into a tree and to have it print out the...
[4 replies] Last: Again, what is the purpose of this? All these steps you have mentioned... (by Smac89)
Using Swap Function in an Array
 
The idea is to make an array and have it sort the contents inside the array in order from smallest to greatest by using a swap function. I don't know why it nee...
[1 reply] : Several things: 1.) You have const int SIZE = 3 on line 5, but you ... (by xismn)
by csharp
Find odd int
 
Hello, Please anyone can help me to find nearest odd int there's way of finding it using if statement like this if( lo%2 == 0 ) // integer part of x ...
[no replies]
need help trying to call a class function
 
Hello all I have a class with its own get and set functions in it. I'm trying to get the user to input a value, then pass that value into a set function. But...
[11 replies] Last: that worked! awesome, thanks all! Now another question, how can I pa... (by mattig89ch)
Can't draw things FLTK
 
I want to draw my own widget in FLTK and as the documentation said I need to subclass Fl_Widget and override draw() which is exactly what I did. I'm using FLTK ...
[1 reply] : I don't know fltk but don't you need to add the shape to the window? (by naraku9333)
Polymorphic problems
 
Hi, Forum. I'm hoping you all can help me solve a problem with polymorphism that's been bugging me. I'm building a simple system management console applicatio...
[2 replies] Last: Thanks, MiiNiPaa! Makes sense. (by todricos)
How i can set if healt 0 game end?
 
How i can set if healt 0 game end? #include <Windows.h> #include <iostream> #include <BluetoothAPIs.h> #include <ws2bth.h> bool Move(int xadj, i...
[3 replies] Last: so where i put it, i'm noob :DDD (by apina058)
can you cobine a function call and inputting a value?
 
Hello all, We're working on classes in my programming class, and I have a question about function calls. Bascially, I have all my set and get functions se...
[4 replies] Last: ok, cool beans. thanks everyone. (by mattig89ch)
Simple way to create and read zip files, platform independet
 
Hello, I am searching for a simple way to zip and unzip files with C++. I did some reasearch with Google, but there are so much options and I don't know wich...
[2 replies] Last: MiniZip from the zlib-Project did the job. (by ohoeppner)
by bads
help me improve my tetris by adding some MENU
 
#include <windows.h> #include <conio.h> #include <iostream> using std::cout; using std::endl; HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE); class Bads {...
[3 replies] Last: to have new game and and put the players name :) (by bads)
need help with binary tree
 
you are to develop some binary trees routind that will handle single work. the binary tree is to be maintain as an ordered tree. the routins you need are add...
[1 reply] : When you create the tree in your main program, you're creating it out ... (by dhayden)
March 2014 Pages: 1... 1819202122... 36
  Archived months: [feb2014] [apr2014]

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