Beginners - February 2014 (Page 9)

Better way of powering than this ?
 
I worked out a way to calculate the the result of a base to a power but is there a better way of doing it ? #include <iostream> int main() { s...
[2 replies] Last: I didn't realise <cmath> could do this ill just use pow and go through... (by jordy1993)
Help with troubleshooting code.
 
What's wrong with the codes I have written? In my assignment I am given a test code. #include<iostream> #include<cassert> #include"Number.h" usi...
[3 replies] Last: @ MikeBoy Correction: !nine.isPrime() should fail if will be cal... (by MiiNiPaa)
by IGI30
Sorting a number
 
Suppose 9 numbers are stored in a variable double numbers ={ 222456 , 424562 , 525462 , ...
[1 reply] : #include <algorithm> #include <functional> //... int main() { //Your... (by MiiNiPaa)
Bracketing Search level 4 stars
 
Yesterday I have solved the Bracketing Search exercise level 2 stars, now I'm doing this level 4 stars with some modified I've made for challenging myself(ignor...
[2 replies] Last: I see, so the main idea is to set the computer first guess in range of... (by LuminaChen)
by IGI30
login program
 
I am looking to make a program which first asks user to login. like 1. Already having an account 2. Create new account If user has already have account t...
[1 reply] : I've created the program but it is not working properly. I'd suggest ... (by coder777)
referencing arrays
 
Just a quick question because i wasn't sure how 32b or higher OSs define pointers. My question is does a pointer refer to a 4byte memory block, or 1 specific b...
[1 reply] : My question is does a pointer refer to a 4byte memory block, or 1 spe... (by kbw)
by IGI30
How to copy a value
 
Suppose I've entered string char username ; std::string user_name; std::cout << "Username: "; std::getline(std::cin, user_name); I to copy the value from us...
[1 reply] : std::strncpy(username, user_name.c_str(), 20); username = '\0'; //Sa... (by MiiNiPaa)
by IGI30
Text Colours
 
These are the codes for color FOREGROUND_BLUE Text color contains blue. FOREGROUND_GREEN Text color contains green. FOREGROUND_RED Text color ...
[1 reply] : Typical console support 16 colors which are coded by integral values f... (by MiiNiPaa)
by IGI30
How to load Load image
 
I want is there is any way to load image(background or windowed) to our program. I'm making a snake and ladder game using C++. I've created the box using ascii...
[1 reply] : Please suggest something. Use SFML. http://www.sfml-dev.org/... (by MiiNiPaa)
by IGI30
sound() function
 
Is there is any sound function can I use in Visual Studio. sound() function is working perfectly in turbo and dev but it is not working in Visual studio. any su...
[1 reply] : There is no native functions to play sound an video in C++, you should... (by MiiNiPaa)
Reading File And Displaying
 
Write your question here. Given a file le name I'm want to know how to write a program that reads the file and displays the demographic data. Peter.txt gives...
[4 replies] Last: thanks guys my code now works the way it should. (by Leslie26)
Functions. Inputfile and output files.
 
I have a pretty straight forward program I am having trouble with. I just want to get an int(hours) and a double(hourlypay) from an input file, multiply them, a...
[1 reply] : [quote=Instructions]It should do this by calling a function called Cal... (by MiiNiPaa)
breaking an string of integers
 
so I'm trying to split a string of integers in parts. I will input a string of integers containing 25 digits and I have to break it into different strings of 5...
[1 reply] : #include <iostream> #include <string> #include <array> int main() { ... (by MiiNiPaa)
Problem with reading in a file into a vector
 
So I need to read a file into these vectors. The file goes like this: Basename Number of locations X1 Y1 X2 Y2 ...X2104 Y2104 kdkdsk 21...
[1 reply] : Lines 30-40: it will read everything it can into coords vectors (until... (by MiiNiPaa)
by skhjr
C++ results in column?
 
how do i get my c++ results in a column as follows: http://s193.photobucket.com/user/skhjr/media/result_zps5edfc0d6.png.html?filters =45699426&filters =1&sort...
[1 reply] : #include <array> #include <iomanip> #include <iostream> #include <str... (by MiiNiPaa)
I don't know what I am doing wrong here.
 
I get bunch of errors when I compile. I have three files Car.h, Car.cpp, automobile.cpp. Automobile.cpp has the main(). I'm using visual studio 2012 Professi...
[4 replies] Last: What errors are you receiving now? (by xismn)
I don't know what is wrong.
 
I'm trying to write a program to tell you your grade depending on the numerical value that is put in and I don't know what I am doing wrong. when I put in the ...
[8 replies] Last: I'm not understanding (by shuerta52)
Variables having improper outputs
 
I keep having an issue with my variables. For example I have the following code (see below). But the output isn't correct. The output was correct a week ago...
[1 reply] : You messed up the code tags; your closing tag needs a / instead of a \... (by Zhuge)
How to ping a server?
 
Just like going to cmd and ping a server, but in c++. I'd like to record results and do fun things with the data. Thanks!
[no replies]
Seeking advice on doing validation within setters
 
I had a function called createAccount that I was planning to have as a friend of my Account class so that it could easily change Account's private members such ...
[4 replies] Last: Yeah I was thinking I may need to pass functions as arguments but that... (by theperson)
February 2014 Pages: 1... 7891011... 60
  Archived months: [jan2014] [mar2014]

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