Beginners - May 2011 (Page 16)

by Tier
Compiler Error - expected primary-expression before ...
 
Hi, I've searched the forums but it seems that the answer to this problem depends on a lot of factors. I am kinda new to programming so if you could help me out...
[5 replies] Last: @ mpruisu He doesn't need globals... Please don't post code that cal... (by Duthomhas)
by tagir
urgent c++ code (1,2)
 
write aprogram that input two members x and y and calculates x^y.
[27 replies] Last: Or: #include <iostream> /* definitions omitted. */ _ __ ______ _____... (by anonymous23323124)
output repeats forever in do while loop
 
This loop is supposed to get the number of players for a tic tac toe game I'm trying to wright. My problem comes in the else statement when the value of the va...
[5 replies] Last: well the cin.clear(); did not work alone. did some digging though an... (by Sgtwisky)
by Tier
Code Problem - not getting the expected results
 
Ok, I recently posted a question and thx for you guys, my program is compiling now. However it is not working as it should be. This program is a calculator des...
[2 replies] Last: thx firedraco. that really helped me. My problem were the 2 divisions ... (by Tier)
by IvanLi
how can i read file and store data into string?
 
as title, i wanna know how to read file and store it into string string file = "test.txt"; string str;//where data should be store in ifstream fin; fin...
[1 reply] : ... while( !fin.eof() ) { //insert all the data into str str... (by Mathhead200)
Inquiry
 
Dear All Can you please let me know what does this declaration means? '_far const char' Thank you
[3 replies] Last: I'm really not sure what _far does, but from the context I'd say it'... (by Mathhead200)
Splitting Up Word/number for Palindrome
 
Hey everyone, I'm working on an assignment for determining if a string or number is a palindrome. My question is, how would you split a word/sentence or number...
[5 replies] Last: Hey I'm working on the project again and have a question. I used a st... (by ecstasyaeternus)
Stuck on while loop paramaters
 
Any Ideas on the parameters I should have for the while loop below. I need the armies to continue until there is no soldiers left. I have tried !armyOne.empty()...
[7 replies] Last: Hmm..... but still he needed to srand or the randomizing will give the... (by mpruisu)
string
 
what i should use if the user enter from keyboard a sentence and sentence will show how many sentence it has i have used myString.length() but this one...
[12 replies] Last: [quote=malikrgc]what you think writing some codes makes you Scientist ... (by Mathhead200)
Visual Studio Multiple Projects in a solution?
 
How does the visual studio's multiple projects in a solution work? What does it mean? So far I seen it twice in two commercial projects at university (both game...
[no replies]
Could someone answer a couple of questions about this code?
 
I got this program to work by "copy catting" some similiar programs, but I want to understand exactly what I did. Below my function void PrintAdvertising...
[11 replies] Last: Just wondering remojr76 , when you multiply two numbers you get a num... (by Mathhead200)
Console Print out Checker board
 
Ch 8, Prog. excercise 8-1, practical c++ programming second edition I am asked to print to console a 8 by 8 grid +----+----+ | | | | | | | | ...
[2 replies] Last: if (lineCount == (1||5||9||13||17||21||25||29||33)) //it doesn't w... (by Mathhead200)
by bbcc
Class I
 
Hello, I am trying to learn c++ by myself. I found this example in the tutorial documentations: // example on constructors and destructors #include <iostrea...
[7 replies] Last: /* * here we create an int, * it gets destroyed when it leaves ... (by Mathhead200)
Input from console
 
I want to take an input from user between two quotes like that for example: MY NAME " HERE IS USER'S INPUT " I don't want to take the name and then cout the...
[5 replies] Last: Win generally comes with the header conio.h which contains the functio... (by Moschops)
Radians to degrees, minutes and seconds
 
Hi there, I'd like to know if I convert radians to degrees, minutes and seconds in the right way. Those 3 values have to be in integral type (int). #incl...
[4 replies] Last: You need to use double or float constructors in order to attain a degr... (by hackthisred)
MinGW, std::bad_cast, "expected type-specifier"
 
I have just swapped from Visual Studio to Code::Blocks as SFML 2.0 was throwing unhandled exception after unhandled exception at me when I used Visual Studio. ...
[2 replies] Last: Yes I did mean runtime_error. And thank you so much - I guess I should... (by anonymous23323124)
help me with this one
 
#include <iostream> using namespace std; int main(); { int x; for (x=24; x<=504; x+60;); cout<<"Starting at 1625 to 2026"<<x<<endl; return 0; } ...
[2 replies] Last: #include <iostream> using namespace std; int main(){ int x; // x g... (by hackthisred)
by GUY25
Stuck with If statements
 
Hi all, new here and new to C++. Just need some help - Best way to describe is with an example. Im making a program that asks the user for 2 inputs. at...
[2 replies] Last: @GUY25: Same as the above ( see : http://www.cplusplus.com/forum/begin... (by lnk2019)
by kassik
read a long int frim a file and save it in the array
 
Hi there I am doing a little c++ project.I want to write a code to read some data from a file and save them in the array.A sample of my data look likes this; ...
[4 replies] Last: Actually I guess the problem is the variables. because when I use this... (by kassik)
How to loop the template arguments?
 
class POne { public : static void action() {std::cout<<"POne\n";} }; class PTwo { public : static void action() {std::cout<<"PTwo\n";} ...
[3 replies] Last: Thanks a lot One thing you can do is write a separate program to gen... (by stereoMatching)
May 2011 Pages: 1... 1415161718... 48
  Archived months: [apr2011] [jun2011]

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