General C++ Programming - November 2013 (Page 41)

Getting an infinite loop
 
I am writing a program for grading a multiple choice test. The test data is pulled in from another file. My problem is that its only pulling in the first line o...
[1 reply] : http://www.cplusplus.com/forum/articles/40071/#msg216313 we must be ab... (by ne555)
reverse c_string question using pointers
 
Hi all, I'm self-learning. I tried to reverse a c-string using pointer. For example href->ferh...Here is my solution: void reverse(char *ptr) { int len; ...
[4 replies] Last: There are easier solution template<class BiIter> void reverse(BiIter... (by stereoMatching)
SFML 2.0 crashes in code::blocks
 
I had this problem and it took me a while to find the solution so i thought i would let everyone know how to get it to work. 1. download it from: http://www....
[no replies]
How to increase memory for a single variable?
 
So, I've made programs like Prime number searchers and such. But the problem is if I use an int or long int variable for the program I am limited by the variab...
[3 replies] Last: Thank you. I'll give those a try. (by bbeallo12)
What to do next for Latin Square Program
 
I have to create a program that allows a user to fill in a (partial) Latin Square of order 4. You can use 0's to represent empty cells. The user will give the n...
[no replies]
Mouse Escape.. for school project..
 
-The program running was okay but how can i make the screen freeze while the mouse is moving ? #include <conio.h> #include <windows.h> #include <iostream> #in...
[no replies]
FindMax value
 
Hello, Im currently trying to make a simple method for an array that would find the highest value. here is currently what i got, but do not know what to change...
[3 replies] Last: Nvm. i fixed it. i used {} instead of . thanks for the help :) (by drzazga)
by VuKid
Clock function error
 
**Why is it that when i use ctime to capture the time I am getting this error: time_t now = time(0);// convert now to string form char* dt = ctime(&now); c...
[4 replies] Last: Well... There is the entire <chrono> header in C++11. However, you mi... (by Albatross)
by maniac
Clear screen without blinking
 
Hello! I have a one simple question :D. I want to output to the console some symbols. Let's say that i have a loop. for(int i = 0; i < 10; i++) cou << "* ";...
[4 replies] Last: Thanks, that helped :D (by maniac)
return to main menu
 
Trying to return to the main menu of adding contact or showing contact after i finished searching a contact. After I use name or phone number or email ID to sea...
[no replies]
Printing out prime from array
 
I am trying to print out prime from array. I have viewed other sources that are similar and tried to use as reference, but only to confuse myself.This is what i...
[4 replies] Last: You can integrate that function in your code as follows: # include <... (by condor)
Array data loss after return from function (1,2)
 
I searched half of the day, yesterday,trying to figure this out. If anyone can help I would appreciate it very much. I have an object that I use to store data...
[35 replies] Last: Are you aware of the reference section on this site? Yes, and it has... (by fatirishman53)
getting keyspace in between objects numbers that store in vectors or maps
 
i have a fix number of vectors object to store. Each have a private variable key number in it. lets say i have 40 objects. my objects from 0-39 works like a clo...
[no replies]
by Snaksa
Snake Game
 
Hello everyone! I want just to ask you something. I don't expect any code from you. I want to make a Snake Game. My idea is to make an array and control the sna...
[4 replies] Last: Yeah that's the one i was talking about ;) (by Uk Marine)
need help, im not that smart on templates
 
Write a simple function template for predicate function isEqualTo that compares its two arguments of the same type with the equality operator (==) and returns t...
[3 replies] Last: this is what i got : this is for only int if you guys help me and he... (by GokuK97)
by Ceset
undefined reference to
 
hi guys i was working on a error manager and come across with a problem i declare this at defines.h and it is global extern std::string fgeError; c...
[2 replies] Last: thx (by Ceset)
gcnew class objects?
 
Hello, I am relatively new to object in C++. Specially, the ones using gcnew. I am using cpp to call some dll from C#. My code works perfectly, but I didn't no...
[1 reply] : Is you question whether using gcnew with classes of not? Well the so ... (by coder777)
Data structure, program using stacks!
 
I really need help with this problem!! Given a set of different types of paired symbols; determine whether it is balanced or not (the opening and closing ver...
[1 reply] : This needs to be modified . for (int i=0;i<x.size();i++) { if ((x =... (by a k n)
How do streams work..Getting error “more than operator >> matches these operands”
 
I'm not sure how streams works as I am fairly new to c++. I have a program which is suppose to add, delete, view and update records in a file. I've added stuff ...
[1 reply] : the ostream operator is wrong: std::ostream &operator >> (std::ostre... (by coder777)
Removing characters from a string
 
I want to remove a particular character from a string. Say '.'. I've tried the following: void removeDots(std::string &x) { std::remove_if(x.begin(),x...
[3 replies] Last: Thank you stereoMatching for the explanation and thank you both for th... (by JohnLys)
November 2013 Pages: 1... 3940414243... 46
  Archived months: [oct2013] [dec2013]

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