Beginners - April 2014 (Page 53)

Can we include if else in switch statements
 
In this code getting "expected a statement" error under case 1: Please help guys: #include <iostream> #include<ctime> using namespace std; int main()...
[3 replies] Last: I got the solution!!! (by goodfellowtodd1)
battery %
 
i can tget this to work i dont know how to make it be if between two numbers ex. if answer between 10 and 20 than true #include <Windows.h> #include <iost...
[1 reply] : You have to split it up into two separate comparisons: if (life <= 20... (by long double main)
sound
 
i am trying to play sound as a test to get the context of sound working to add into other programs but it is giving me a error on the file address. #inclu...
[4 replies] Last: Also make sure that your WAVE file is relatively small (say, less than... (by long double main)
Need help Fast!
 
Use a while loop to allow the user to enter the number of credit hours a student plans to take next semester. The program should allow the user to enter the num...
[no replies]
sound2
 
cant get the file directory to work it says there's a error. #include <iostream> #include <Windows.h> #include <stdio.h> using namespace std; int ...
[2 replies] Last: i did that and it doesnt work (by kmtompkins)
I have mid term test today!
 
there is sample test but professor does not give out the answer for the sample test :/. Help me!! a. Declare an array named values that can store at most 100...
[7 replies] Last: @booradley60 I solved it, it was really simple. #include <iostream> ... (by qwertyking)
what part of the array is a character on
 
i am using allegro 5 and i have drawn a map. i got a fairly simple tile set. now i am trying to figure out how to add collision to specific tiles to have an out...
[5 replies] Last: Your welcome (by Codermik)
help with this program it wont compile
 
HI I can't figure out why this won't compile I'm specifically trying to get the readfile to work properly. please help. #include <iostream> #include <...
[2 replies] Last: Oh ok I thought the prototype just needed the type. And the declarati... (by bguy08085)
by rb0306
calling the same calss/method 2 times with different parameters
 
Write your question here. All, sorry for asking basic question, couldn't able to figure out how to do it. I am calling OpenGL class GlobJ to paint lines,c...
[2 replies] Last: keskiverto, Thank you very much for your help. That worked. I think s... (by rb0306)
What does this particular code fragment do?
 
what will (rand()%4)+1; do in the code? I know : num1 = rand()%100; - generate numbers randomly from 0-99 & num2 = rand()%100+1; - generates numbers ran...
[1 reply] : The modulus operator ( % ) returns the remainder that you get when you... (by long double main)
by mlor3
arrays
 
anyone know a good online tutoring website for c++? ive got a complex assignment involving arrays and formulas that is killing me.
[2 replies] Last: I think you on one of the best sites for tutoring. They have really he... (by niludown)
by xvvll
Help with this program please
 
I have an assignment that needs me to read data from a file, i figured how to do it, however, when i add another name to the file, it just goes to ****... here...
[1 reply] : Does Random Name have three numbers after it? It doesn't in your exa... (by AbstractionAnon)
Can someone please clarify what I am suppose to do in this program?
 
I am confused, and I don't know how to approach this problem. I am confused when the problem is asking me that, "input is taken from a file and the output is se...
[3 replies] Last: Hi there, thanks for both your responses. I know how to open a file in... (by Kernmaster34)
Auto guess program problem
 
Previously I made a program which allowed the computer to generate a number between 1-100 and I had to guess it. But now I'm making program which will allow ...
[1 reply] : Line 19: number will always be between 0 and 99. What's the point of... (by AbstractionAnon)
Replacement in c-style strings
 
We are doing a project using dynamic arrays and command line arguments. The objective is to be able to enter in the command line like this: ./program <file_n...
[1 reply] : So if the stringLoc holds the address of the first place the substring... (by bwilfong3)
Inserting a string into a type double array
 
Hi I wanted to find out how would insert a string into a array of type double? double myArray ; myArray = "Sentence" How would you make a...
[4 replies] Last: Thanks! This will do quite fine. (by JasonMcG)
No negative number in a structure array
 
I am writing a program that cannot allow a negative number, but it is a structure array. Not sure what to do. Here is the code from the array to getting the inp...
[3 replies] Last: Thanks @Cody0023 I now feel like an idiot. I changed it and it worked.... (by musicman74)
by mimito
Jacobi c++
 
Where is my mistake? Please help , it only do the first iteration. #include <iostream> #include <cstring> #include <cmath> using namespace std; co...
[14 replies] Last: http://math.semestr.ru/optim/iter.php here is the online calculator fo... (by mimito)
Class Time
 
//Why this s***** program is not working? //ERRORS ||=== Build: Debug in class_Time (compiler: GNU GCC Compiler) ===| obj\Debug\Time.o||In function `ZN4TimeC2...
[4 replies] Last: I found out why: the constructor with default arguments had become the... (by closed account jvqpDjzh)
Please need help with opening csv file as string and double.
 
Hello, I would like to read both double and string values from a csv file as input data. I have already programmed to open the csv file as double, but I'm no...
[6 replies] Last: Thanks again Abstraction, I've got it fully working now! (by Ryan542)
April 2014 Pages: 1... 5152535455... 67
  Archived months: [mar2014] [may2014]

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