Beginners - January 2012 (Page 8)

Can't the main function be of type 'void'?
 
It seems that the main function can not be of "void" type. Is it true? If so, why C++ prevent the type of the main function to be void? Thank you very much!
[12 replies] Last: The reason, besides it being a standard, goes back to a time before MS... (by roberts)
omg im dieing mt brain hurts hours trying to solve these problems
 
Before you judge me I have spent hours googling looking in my book trying 100 of combinations and everything and i still cant get this code to function properly...
[11 replies] Last: moschops is the solution to add the limit into the while() or to add ... (by pleasehelpme)
Hey Framework, GO AWAY!
 
You are awful, I don't know what your problem is, but people like myself on this forum are trying to learn, and you are just wasting everyone's time and not bei...
[6 replies] Last: Ignore him, report his posts, move on. His account was hacked :p (by LB)
troubles with arrays.
 
hi! so i have an assignment which consist of a bunch of functions. One of the functions is used to read characters inputted by the user and place them into an a...
[5 replies] Last: To use this loop: for (entered = 0; entered < current; entered++) c... (by Lynx876)
by kapo
framework
 
obviously he's been hacked.. js -_-
[1 reply] : Probably. A 1740 poster wouldn't go mad like that. The hacker is prob... (by ihato)
++ operator
 
float var; var++; I wonder if this is valid.If Im not wrong, i++ is more efficient than i=i+1 but is this also true for float variables?
[5 replies] Last: > someone on here once told me that ++i was more efficient. > I've use... (by JLBorges)
by eel
int main() and % syntax errors
 
I am new to this whole programming thing. I have until 10:00pm CST tonight to have this program submitted to my professor, but can't figure out what I have don...
[2 replies] Last: // The program is designed to take a number between 1&99 (to represen... (by kapo)
For loops and swapping characters in arrays. (help please)
 
so basically I have to make a function that will swap a character with a character directly to its right. void swap (char letters , int current) { //swap ...
[2 replies] Last: so if I did this void swap (char letters , int current) { int ho... (by aswmack)
by PopEye
Tips on Making my Code Shorter?
 
Awhile ago I created a C++ program that has a structure that contains students names, students grades and their overall grade (A, B, C-); just to practice. This...
[no replies]
homework help
 
hello everyone, i need help with my homework. i will appreciate your knowledge and help with my problem i have. i cannot get my program to work. i need to ask ...
[4 replies] Last: thank you guys for all your help. i will study your comments so i can ... (by kaseyahumada)
Change command prompt
 
I recently found( from Catfish ) a new command promt that I wish to use with Visual Studio Ultimate 2010. Here's the console: http://sourceforge.net/project...
[7 replies] Last: Yeah, I found another site about it, saying that it had to be started ... (by Lynx876)
error: expected primary-expression before 'int'
 
I'm working on a program, and as I'm going through the first part of it, I get these errors for line 55: error: expected primary-expression before 'int' error...
[4 replies] Last: Hey Framework, your criticism is not helpful. So please stfu if you c... (by ErinCorona)
Linked Lists
 
Ok so I know that they are a container, and they are different then vectors, that about all I know. I'm starting on this graduation program at http://www.cplusp...
[8 replies] Last: People generally end up with helper functions; things like addToEndOfL... (by Moschops)
Easy Question
 
I m standing in front of computer for hours. Maybe i should take some air. I don't know but i m making a mistake here and i can't find it despite it is a very e...
[3 replies] Last: What errors are you getting? Copy and paste them here. (by Lynx876)
I got nothing...
 
Hi everyone I have a class where I have a function that converts the string(pointer) to upper caps. class Name { private: char* ch; int size; ...
[4 replies] Last: Ah got it, Thanks epryos for your help (by detroit)
Audio in background
 
Hi people, is there a way how one can play an mp3 in the background of a game? I have seen irrKlang library which has an example code which stops the mp3 when a...
[2 replies] Last: SFML has an audio library which is easy to use: http://sfml-dev.org/t... (by Stewbond)
by ihato
"Checking" speed (if,switch)
 
//Which of these are faster: if (stat1 && stat2) {} //1 if (stat1) {if(stat2){} } //2 //I think 2nd one is faster because it stops the further checking...
[3 replies] Last: I was just wondering. Thanks people. (by ihato)
Double store to vector done instead of one. lool
 
----------------------------------------------------------------- EDIT : IM SO SORRY IT WAS AN IDIOT DOUBLE CALL I HAVENT SEEN SO SORRY FOR BOTHERING ANYONE...
[no replies]
Again for the Doppler shift
 
Hello guys! I treed to solve the problem coding for Doppler shift, and look what I have done: #include <cstdlib> #include <iostream> using namespace std;...
[2 replies] Last: I see you've been stuck on this for a while: http://cplusplus.com/for... (by Stewbond)
Trying to encode something.
 
string encode_message(string message, string key) { string answer; char sub; char orig; //for each letter in message for(int i=0;i<message.length(...
[2 replies] Last: Good call. Forgot about the header. Thanks. (by closed account 365X92yv)
January 2012 Pages: 1... 678910... 48
  Archived months: [dec2011] [feb2012]

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