Beginners - July 2014 (Page 16)

Bot Path and Controller Interface
 
I know how to create your basic programm that compiles as a CLI or exports and/or saves data to a .txt file... But how does one build a GUI? I ask because I...
[3 replies] Last: Maybe better to google about your device's LCD and how to display on i... (by lsk)
nested for loop isn't initializing my char[]
 
When my code runs through this loop I made to compare two strings it doesn't initialize my char with the new values. I still get the output of "xxxxx" instead ...
[2 replies] Last: don't know why i didnt see this. I may have to rethink my for loops fo... (by ultratoke)
for loop string Compare program.
 
So I am making the game called mastermind. It's simple you have the computer create a code that the player doesn't know using n values with a range of n. Ex: co...
[1 reply] : You used && temp != 'x' for what?, is it always give you FALSE ?... (by lsk)
Lining up Data
 
Lines 220-233 are outputing data in the two rows like xxxxx xxxxx xxxxx xxxxx and so forth. The problem I'm having is lining up the second colum...
[2 replies] Last: This works perfectly, thank you so much for your help! (by jynx678)
How to create an array of c style string?
 
Hey,guys, I just read from a textbook saying that you can actually create an array of c style string like this: char *stringArray = {...} which baf...
[7 replies] Last: To helios, Yay295 and keskiverto: Profuse thanks to guys! Your replies... (by glenjoker)
What does this error mean?
 
I am getting a really annoying error telling me that I need a ";" where I shouldn't. The exact error is: test.cpp:38:3: expected ';' before 'median'. What am I ...
[11 replies] Last: Oh fantastic, thank you so much everyone! I've got it working!! (by VisuAlly)
string from user input
 
how could i make it so this works on a user inputted string instead of 'test string' #include <stdio.h> #include <ctype.h> int main () { int i=0...
[10 replies] Last: how can i get my code to get input and print output for that fucntion.... (by kzaiter)
Help making pseudorandom number generator.
 
Could someone: - Write a pseudorandom number generator in C++ - Number generator should have overloaded methods to allow random floats, doubles, integers ( Si...
[3 replies] Last: And if you haven't realised by my name i am a complete noob. So i nee... (by ProgrammingNoob131)
String-Time conversion
 
Hi I want to ask a question. How cani convert a string to time? I want to convert a string with HH:MM:SS format so that I can use difftime() to compare that and...
[no replies]
user input into 2d array
 
Wondering how to get a users input to store into a 2d array. am I even close? Also I was wondering about how to get the array to display as a table once I get ...
[2 replies] Last: you could just put input straight into the array instead of using ano... (by Cody0023)
try/catch bug
 
I'm trying to catch a user error in the try block my first try works correctly but my second one keeps me in the loop and won't break me out. the second if sta...
[9 replies] Last: ultratoke, See if this makes sense to you: When and How to Use Exc... (by closed account z05DSL3A)
Error: Invalid operands for Binary expression
 
I've created a class that works with vectors doing various calculations and what not. I have overloaded operators that I've created outside of the main in separ...
[3 replies] Last: What I mean is why do you need operator+ that works with std::vector... (by ne555)
by Marnez
Not allow space in cin
 
How do I detect the user input to be a space and make them give me a numeric age? This doesn't work #include <iostream> #include <string> using name...
[1 reply] : #include <limits> ... cout << "Hello, what is your name and age? (se... (by Smac89)
Explain this to me please; For Loops
 
I don't understand the output based off this code #include <iostream> using namespace std; void main() { int i, temp ; for(i = 0; i < 10; i++) temp ...
[6 replies] Last: but if it was ++i would that be how it is run? No. Nothing can cha... (by Disch)
Math coming out incorrectly?
 
When I run this code timeleft always comes out to a weird negative number for example when age is 15 timeleft evaluates to -1928147296. How can I fix this? ...
[3 replies] Last: Looks like an integer overflow. An "overflow" is typically when you tr... (by Catfish666)
by yepMe
Thinking in c++, problem in understanding one exercise
 
Hi All, I am doing exercise from thinking in C++ , chapter 11(references and copy constructors) exercise 20. but I am having problem in understanding the exe...
[1 reply] : int x = std::max( 7, std::min( 3, 8 ) ); Min is argument to max abov... (by keskiverto)
by Vorp
Filling in an integer array with user input
 
Hey there.. I am writing a program, and I need my user to input a 5 digit number. I then need to store that into a "short" variable. I know how to get userinp...
[4 replies] Last: This should work: #include <iostream> #include <math.h> using names... (by Cube777)
by Vorp
Assigning multiple class objects to ints
 
Hey there.... I was wondering if you can assign multiple objects of a class (or any other date type for that matter) to an int? For example: I have to fol...
[2 replies] Last: You can create multiple objects like you do with an array. #inclu... (by Codermik)
Sales informations
 
Hello, I'm trying to figure why all of the sudden my program isn't running correctly. It was running just fine. Now when I run it, it will ask for the values, ...
[2 replies] Last: Tested under Visual Studio 2013 Ultimate and works as Wildblue's outp... (by Codermik)
Printing My Array
 
Hello, I'm trying to create an array of 10 numbers to be input by the user and print it. I want my program to be able to stop reading numbers and print the a...
[4 replies] Last: Oooh okay. Thanks! (by VisuAlly)
July 2014 Pages: 1... 1415161718... 43
  Archived months: [jun2014] [aug2014]

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