General C++ Programming - January 2015 (Page 17)

Error check - only alphabeticel inuputs
 
Hi guys! How can i set up an error check so only letters are entered? I know how to do it for numbers but have no idea how to make it so it only allows a-z i...
[3 replies] Last: > On a side note how could i apply tolower to an array. Consider usin... (by JLBorges)
Continue statement problem
 
I used for loop to make a program. it goes like this: . . . for(i=0;i<10;i++) if(i==0){ cout<<*Question*; cin>>b ; if(b =='y') continue; else if(b...
[1 reply] : Use brackets. for(...) { if (i==0)... ... } Not for(...) if (i==0).... (by Konstantin2)
i fixed it
 
cout<< "i fixed it\n";
[1 reply] : In line 72 you compare addresses of strings, not their content. use s... (by Konstantin2)
Store user input, then display array contents
 
I'm coding a hangman game. I'm trying to store user entries so i can output them to show the user what they have already entered. Problem is that it's not displ...
[6 replies] Last: Thanks for your help so far Konstantin. Here's my code so far. Every... (by lilpopjim)
Help with something simple.
 
Does anyone know how to write this in c++? Thanks -when i hit the g key on my keyboard it will -send 1 on my keyboard, and right click 3 times then it will -sen...
[2 replies] Last: acutally i did. And i will be usuing sendMessage for this not sendeven... (by under50)
Catalan number
 
Do anyone know about how to find its specific term in c++?
[1 reply] : Hi, Did you look at the wiki page for this? There is a formula in the... (by TheIdeasMan)
by Martes
write struct with string in binary file
 
Hi! here is my problem. I have a structure : struct Entrainement{ string muscleCible, nom, unitesObjectif; double objectifActuel, dernierObjectif, obj...
[1 reply] : No, you cannot do that. std::string is not a POD type and so you can... (by LB)
Understanding the point of pointers... Pun intended.
 
I understand that pointers allow a better use of memory. This is the scenario I keep using to wrap my mind around the use of pointers: If you (possibly) use 1...
[2 replies] Last: Awesome! Thanks Mutexe! Good Reads! I would like to try and place the... (by bbugyi200)
Problem catching invlaid entry
 
I am having an issue where I am trying to ensure the entry is a valid numerical entry here is what I Have but I am confused if I cause a flag flip how do I rese...
[1 reply] : Get rid of the semi-colon on line 5, then add an else after the if blo... (by cire)
vector in header that holds one of my other Classes
 
I can not seem to add a vector to my head file. I have tried many things and can't figure it out. Compile and Compile error - g++ -Wextra -pedantic -std=...
[2 replies] Last: Thanks! (by retroCheck)
Generic Class Data member calling Functions.
 
using namespace std; template <class HASH, class intT> class Table { private: typedef typename HASH::eType eType; typedef typename HASH::kType kType; i...
[no replies]
function non-class type ???
 
My g++ compiler is telling me that said printTest() is not part of the class. I have presented it in header class and implemented it in .cpp class but still kee...
[3 replies] Last: That was it, thank you very much. I have another class that works the ... (by retroCheck)
Challenge!
 
Okay it may not be very challenging if I am able to word this well enough so here goes. I need someone to help me get to the bottom of a problem Im having wi...
[10 replies] Last: Well looks like it uses HTML and Javascript to me but either way it's ... (by giblit)
photo
 
Is it possible to upload photo here ????
[1 reply] : nah (by mutexe)
Problem with arrays
 
Could you tell me where is the problem? #include <iostream> #include <time.h> #include <cstdlib> #include <iomanip> using namespace std; int displayArray(int ...
[4 replies] Last: thanks i will remember this forever :) (by Leyli698)
Trying to catch invalid repsonses
 
Hello everyone I am getting started in c++ and have been working on a class project. My issue is that I am trying to catch invalid responses and display an err...
[2 replies] Last: Thanks I was sure it was something simple I was not seeing and you wer... (by Digimstr)
C++ help
 
Hello I am currently in the subject of C++ in school. I had done half of the code can you guys help me do the code or at least give me an example of what I'm su...
[1 reply] : if you guys do want to learn more of what I'm suppose to do and get ... (by mutexe)
Recursive Function Complexity
 
I have a function T(n) = T(n-1) + T(n-2) + T(n-3) + 8 and T(1) = 1 I need to calculate its run-time. My idea : Approximation Method Worst Case : I say tha...
[2 replies] Last: MiiniPaa thank you . I know it's tough work but will you please tell ... (by oleg9419)
by hanest
help creating function
 
Hi guys, i have a piece of code which gets multiple objects to move randomly at a designated number of intervals. I want to create a function which calculates t...
[4 replies] Last: thanks for the help, the j was wrong in more ways than one, i also had... (by hanest)
Select in an simple p2p program
 
Heyho, i have a rather annoying problem: i've written a simple p2p program, that should exchange data between 3 clients Problem: the first client i start is ...
[no replies]
January 2015 Pages: 1... 1516171819... 24
  Archived months: [dec2014] [feb2015]

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