Beginners - November 2011 (Page 18)

by KongMD
Getline truncating first character in loop
 
Hi, all. My problem lies in a do-while loop that works correctly on the first go, but subsequent inputs truncate the first character of the input. Any ideas as ...
[3 replies] Last: Thanks for the solution, aruawons! I fixed the syntax of that ignore s... (by KongMD)
Function Constructor?
 
Does anyone know why FPS() wants a contructor, or how to use % properly? std::string s = "FPS-%",convertInt(FPS()); Thanks in advance.
[5 replies] Last: Use + instead of , std::string s = "FPS-%" + convertInt(FPS()); (by Peter87)
Quick Errors problems?
 
Hello When trying to compile a program I am getting these two errors. Could you please give me a clue what they mean? Here's the program.. // Ogres Vs Dwar...
[5 replies] Last: string fight(string winner) (by Moschops)
by Blast
Segmentation fault with Vectors
 
Hello I am having a segmentation fault in a binary heap that I am doing for an assignment and it is baffling me! I must admit it was quite fun the first 3 days...
[2 replies] Last: so should i encase that if statement with "if (a < temp)" condition? (by Blast)
Reading two arrays from a text file
 
Hello everyone, I am currently working on a program that is suppose to allow me to validate if a user is a member of a store or not by reading the user input ...
[2 replies] Last: Sorry about that. I'm new here and I thought it would be a good way to... (by Asura20)
Array searching
 
I know that this is going to seem easy compared to some of the other stuff that I've asked... but how do you search through a 2D array using a while for the ...
[7 replies] Last: Moschops, you're awesome. I just don't hear that enough :p... (by Moschops)
Random monster spawning
 
Hey everyone, question is i have my random set as such random_number1 = rand() % 9; random_number2 = rand() % 9; Then i am spawning my monster as //check ...
[1 reply] : I don't get it. As I can see it you simply despawn your previous posit... (by eypros)
try this one
 
Write a modular program that analyzes a year's worth of rainfall data. In addition to main, the program should have a getData function that accepts the total ra...
[4 replies] Last: yes your allowed (by kdmpenguin)
Could function main call itself?
 
I am having trouble with it, I have used some code to test it. In Microsoft Visual C++ 6.0 and Mingw gcc,it could work. But does standard C or standard C++ ...
[2 replies] Last: The C language standard allows recursive calls to main(). The C++ lan... (by Cubbi)
Recursion: Swapping char type in an array
 
I have created a program to generate a set of characters in an array. The objective is to move all vowels generated by the array to the left, for example: given...
[2 replies] Last: post modified. (by daldrome)
problem in debug
 
#include <iostream> #include<ctime> #include <cstdlib> #include<fstream> using namespace std; int main() { int **alpop; int i,rand_index,p,pop; in...
[3 replies] Last: This generates the first level: alpop=new int * ; And this the seco... (by coder777)
New to Exceptions
 
Hey thanks for reading this. I've been given a test for a placement at a programming company and I'm a bit stuck. I've been given some code for a space inva...
[6 replies] Last: sorry for double link :D (my CTRL+C didn't work) there are more videos... (by codekiddy)
How flows goes, here
 
Hi, I'm looking into this expect of code, here is one function, I can't get how the flows goes with if where you can see "cout ##1,2,3. I expect that I'll see...
[1 reply] : The return is deceptively indented. It makes it seem like it's inside ... (by helios)
Help About the C++ Programming
 
I am a new user. Please tell me How can I learn C++ in easy way Through net and Books
[1 reply] : Alright, well for starters I think you should check out the tutorials ... (by Code Assassin)
Using ORs
 
Hi I have the following if statement if(MACAddress == '0' ||MACAddress == '1' ||MACAddress == '2' ||MACAddress == '3' ||MACAddress == '4' ||MACAddress ...
[5 replies] Last: jim80y is right, that function does exactly what you want: http://en.... (by Gaminic)
need function help
 
I am writing a program project for class and having difficulties with creating a value returning function that reads in a integer value, takes that value compa...
[4 replies] Last: I found the error of my ways: I had it written like this: #i... (by computergi)
confused about vectors and structure
 
Say I have a structure: struct A{ A(int size); vector<int> myvec; }; A::A(int size) { myvec.resize(A); } So now I have my structure called "A"...
[1 reply] : This didn't even compile for me until I gave the constructor parameter... (by mzimmers)
Replicating cin String function
 
Hello. I'm creating a class that replicates some functions of the string class and I'm having trouble coming up with a function that should behave like "cin << ...
[1 reply] : This is the snippet I'm working on: void mystring::get(void) { for ... (by silver1x)
Need help for little program
 
Hi, i am new to C++ and I wrote a program that shows number min. to max. at screen. but it didnt work. if you help me please. #include<stdio.h> #include<coni...
[6 replies] Last: Really thank you. i got it. have a nice day. (by murat1290)
by vin
Pointer arithmetic in sscanf function
 
I'm modifying an OpenGL ms3d model viewer in wxDev-C++ to also load another 3D model format. The new model format appears to use a different winding order fo...
[2 replies] Last: Thanks for your explanation. I will study C++ stream functions and us... (by vin)
November 2011 Pages: 1... 1617181920... 65
  Archived months: [oct2011] [dec2011]

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