Beginners - February 2015 (Page 34)

C++ progrm help (visual studio 2013)
 
I need help with a program i have to write. "Your program should ask the user for a number and then print two squares and two triangles out of stars whose size ...
[8 replies] Last: OHHH alright, that first if statement was what got me. I have no clue ... (by YungScrublord)
Some loop problems
 
Hey guys, Im writing a program right now where the user enters integers until a sentinel value is entered. After that, the program displays how many positive...
[1 reply] : Have an integer to store # of positive numbers and an integer to store... (by closed account 2UD8vCM9)
c++ Help
 
John and Lacey moved to CSU East Bay last quarter. John took 3 classes and got a GPA of 3.5 while Lacey took 4 classes but she doesn't know her GPA. Write a p...
[1 reply] : This is not a homework site. We will help you if you are stuck on a po... (by closed account 2UD8vCM9)
Counting digit alpha and other characters in input file
 
I have code to open and display an input text file in the console but need to count the characters (digit and alpha) and dont know how to go about doing it. Inp...
[1 reply] : http://www.cplusplus.com/reference/cctype/ (by keskiverto)
Can someone help me fix this code?
 
I am supposed to put two functions in a header file set. I am supposed to generate a table converting celsius to fahrenheit and fahrenheit to celsius. However, ...
[7 replies] Last: The header: * Remove lines 1 and 3, for they are not used. * Recheck t... (by keskiverto)
I need help with turning pseudo code into a simple module
 
Hello everyone, I am new to programming and trying to take a flowchart into pseudo code then into a simple module based off that pseudo code. The module need...
[3 replies] Last: Or this? public class SumEvenNum { public static void main (String ... (by johnsti)
by Gohmer
Need help with Quadrant Program
 
Hi I'm having a slight error with my printf output statement. It displays the coordinate but the y variable has a decimal with 6 zeros after it. How can I fix t...
[1 reply] : Nevermind I fixed it. Thanks. (by Gohmer)
Infinite loop in console
 
I'm new at programming and I got to do this for homework at school. So my problem is when I go into the console, I want my program to loop if I enter "oui" as x...
[1 reply] : x is bool. It accepts only 1 and 0 (or true and false if boolalpha is ... (by MiiNiPaa)
Question about the difference of string and char
 
Write your question here. I do not know why in the following code only d="abc" succeed. when I use the code string s="abc"; then s can not be convert...
[1 reply] : s is a std::string and c is a c-style string. You can put s into c wi... (by Texan40)
Help. reverse a string with a twist in it...
 
The purpose of this self-made code is to reverse a string. When i enter ABCD it outputs DCBA. The code is heavily twisted on purpose. I am playing with it to...
[1 reply] : The s1 (or *(s1+0) or *s1 like you write it) is a pointer . A... (by keskiverto)
Help converting binary!
 
Hey guys, I'm wondering why this code wont convert to characters? It keeps coming up that it is invalid binary even though it is correct? When letters or non nu...
[no replies]
Casting Pointers
 
Plz anyone tell me, "What is casting pointers ?" Give me example. Thanks.
[7 replies] Last: C++ is strictly typed language. If we start by saying that name "foo... (by keskiverto)
by h4ever
how convert 4 bytes string to integer?
 
How to convert 4 bytes n read from binary file to integer header_offset? uint32_t header_offset ; char n ; size_t in; ... in = fread(n, 4, 1, fp); // v...
[2 replies] Last: Yes, thank you (by h4ever)
random number code just doesn't work
 
I am getting some weird results from this code. Well, weird for me anyway. It is just a simple program, where I want to generate a random number, then use tha...
[3 replies] Last: Okay, and thanks so much for getting me through this. It is difficult ... (by James1st)
C++ primer code not working
 
So this code come directly from the book, like I literally copied it and it wouldn't run on my computer. I was going to use it on the exercises but it won't run...
[no replies]
dumb question, int 1 = 1300;
 
im just getting back into c++ and im making random crap to screw around with, but im trying to do this: int 1 = 0; int 2 = 500; int 3 = 1700; and so on but ...
[3 replies] Last: sorry i should have been more specific, its setup so that the user ent... (by gogogokitty)
Using arrays in member functions
 
Hi, In lines 94 and 95 i'm getting an error message that says 94 :invalid conversion from `int*' to `int' 94 :initializing argument 1 of `void Country::setP...
[2 replies] Last: 94 :invalid conversion from `int*' to `int' Line 81: You declar... (by AbstractionAnon)
I need help with my code.
 
Hello, I'm in my second semester of computer science. I've been trying to finish this project for the past 5 days but I need help to figure out some part. Woul...
[no replies]
Recursive function for Collatz
 
I have to design a recursive code for the collatz coefficient. I feel like i am very close but I cannot seem to call the collatz function correctly. #include...
[no replies]
Can anyone see what I'm doing wrong?
 
...
[2 replies] Last: Ahhh! It never occurred to me that I could put the multiplication at t... (by ChillMick)
February 2015 Pages: 1... 3233343536... 52
  Archived months: [jan2015] [mar2015]

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