Beginners - November 2013 (Page 46)

by JohnJH
Code executes only in debugmode?
 
how come can a program only be execute in debug mode?? I am using visual studio 2010, and don't see what the problem should be. The program compile the file wi...
[3 replies] Last: Are you having this problem for every program you compile, or just one... (by long double main)
by wassup
Error C3867
 
I tried many methods,i am lost with it.i need your help source.cpp(28): error C3867: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>:...
[3 replies] Last: really? as my teacher told me that strrev is for char, big thank to bo... (by wassup)
Convert user inputed time from 24hr scale to 12hr scale
 
I recently wrote a program that would convert a user inputted time in the 24hr format into the 12hr format. It worked for all intents and purposes, but I though...
[3 replies] Last: Thanks for the reply! I do have a question thought. Where should I put... (by ukprakash)
Conversion Help
 
done
[1 reply] : On line 31, i use .equals for the string, but cannot figure out what t... (by drzazga)
by as0re
Can somebody help me with choosing an option?
 
Hello everyone, i am a complete noob in c++, i am trying to make a calculator but i am confused with letting the user input an option ex. 1 or 2; if anybody hel...
[4 replies] Last: so in lines 40,45 should be else if and line 50 just else? also im con... (by as0re)
Hey, Anyone willing to help with this program?
 
Write a c++ program that stores the following numbers in the array named miles:15,22,16,18,27,23, and 20. Have your program copy the data stored in miles to ano...
[4 replies] Last: Well, as it says in the tutorial: a = 0; // a [offset of 5] = ... (by Chervil)
by Zyzz
Calculating 3rd side of right triangle
 
Hi, I am extremely new to c++ this is my first language ever and I need some help That is what I have but I get an error c2661 'pow' no overload function takes...
[10 replies] Last: Well, this would have been my preference: sideC = sqrt(sideOne*si... (by Chervil)
by jenaf
You gotta love undefined behavior. (C)
 
Hi! I just entered the lands of Undefined bahavior ^^ here is the story: I was writing a short code (only about 100 lines) and as it was just some kind of...
[no replies]
Switch Structures
 
Out of curiosity, suppose the user entered the wrong input under switch structure. If user entered wrong, how do I make him ask again? char ch1, ch2; ...
[2 replies] Last: also, instead of writing both the capital and lowercase version of the... (by Zyzz)
by RabMac
Controlling Data Input
 
Hi, I am currently trying to ensure that the user enters an int value when prompted and it keeps looping until they do. Here is my code: void get_facto...
[1 reply] : It seems to work when the input is an int, char or string but if the ... (by Yanson)
Enumeration Error
 
Getting an error on the cin>> classes. On the operand sign >>. What i'm trying to do here is asking the user for his favorite subject, in which they will type h...
[4 replies] Last: //Enumeration for classes #include <iostream> #include <string> using... (by Yanson)
count how many times a letter shows up
 
the program will ask the user to enter a sentence and it will count the amount of occurrences of the lowercase 'a' in that sentence. #include <iostream> u...
[2 replies] Last: So i tried something different and so here is my code. i just don't kn... (by klayrahx7)
3 array questions
 
Questions: 1- why my cout = array + 1? In other words, why im getting one random number more than the array allocation. 2- how i can get a unique set of rand...
[no replies]
need problems
 
Hey guys , could you please give me a problem or two so I can solve using functions ? " I create the function without using the functions in cmath " I need so...
[3 replies] Last: http://projecteuler.net/ (by Yanson)
Vector out of range
 
I am runnig a program that loops ~100,000 times. but it is going through this for loop once and then is returning terminate called after throwing an instance ...
[2 replies] Last: Yep, I realized right after I posted that that was the answer thank yo... (by Feymanismyhero)
Is there any way to call a class instead of the object within the class?
 
Write your question here. class invItem { int weaponMaxDam, weaponMinDam, itemPrice; string weaponName; public: invItem (int,int,int,string); i...
[4 replies] Last: Thanks for the reply disch, I now have it working and not taking up 10... (by zakedodead)
one-dimensional array of char from text document
 
Hi everyone, I'm supposed to write a one-dimensional array that uses the first line of a text document but I have no idea how to do this. Can anyone explain to...
[1 reply] : Sure, 1: Open the target file with an std::ifstream object: http://ww... (by Computergeek01)
c++ Question
 
Hi The number of lines that can be printed on a paper depends on the paper size, the point size of each character in a line, whether lines are double-spac...
[no replies]
How to make the while loop only go once around?
 
The program works but it keeps going and going. I don't know how to stop it. Can anyone advise me on how to do this? // Program to split integer into its sep...
[4 replies] Last: Thanks for your help. Had to do it with a while for the question. (by billyjoe)
Void Function error
 
Can I know what the error is here in my code. I get an error on visual studio saying "redefinition of formal parameter classes" void getfavoritesubjec...
[2 replies] Last: Nevermind I got it :D. I had declared string classes again in my funct... (by fahmankhan75)
November 2013 Pages: 1... 4445464748... 80
  Archived months: [oct2013] [dec2013]

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