Beginners - November 2013

by davef
Another word count problem
 
I have to write a program that counts the words in a *.txt file. So far I've been able to figure out how to get a character count. I would like to be able to do...
[1 reply] : Got it working. I used the isspace() function to count the spaces an... (by davef)
Need a little help
 
Am new to programming and was facing a problem. This is not the code I was having trouble with but this explains my issue. It prints both x and y no matter wh...
[2 replies] Last: a = 2 -- a is assigned 2 a == 2 is a equal to 2? http://www.cpluspl... (by mobotus)
by ivan1
2d array element change
 
I have 2d array (10x12), and they have 0 and 1s in them. I want to count the 1s in each array and I have two cases here: (1) if an array has more than three 1s,...
[no replies]
by h4ever
binder2nd produces errors
 
This code I have from an article from 2001 and it produces errors. Can you help to make working? stdafx.h #include <vector> #include <iostream> #include <funct...
[2 replies] Last: thank you very much (by h4ever)
by layanM
help me quick plzzz
 
i have to write a program that says whether the number i enter is Naracissistic or not. i wrote the codes and everything but every time i write 153 or 2467805...
[4 replies] Last: oh ok, thnk u :) (by layanM)
Error Checking in Program Help
 
Hey guys, Have a program that I've been working on that is supposed to check whether a user inputs valid numbers. In the segment of code that I'm working on, y...
[4 replies] Last: Still looking for help with this. (by billbarr)
Function to make unique string array
 
Hi all, I am working in Visual Studio 2010 (on Windows) and am near the end of my first C++ class. I am having difficulties writing one of the functions for ...
[7 replies] Last: This idea works very nicely! Thanks for the tips. (by lunafly)
by hilft
Bool + array question. need quick help!
 
Can someone explain step by step what is going on in the code below to get the output "false" ? #include <iostream> #include <string> using...
[3 replies] Last: On line 6, false & true means "false and true", which evaluates to f... (by ats15)
by hilft
Struct question
 
why is s.c.a outputting the number 3? why is s.c.b outputting the number 4? can someone explain it to me? #include <iostream> using namespace st...
[2 replies] Last: 1 is for int a, 2 is for char b, 3 is for float c.a, and 4 is for int ... (by ats15)
Functions like in Java
 
Hello! I'm trying to do "Java functions in C++". (I dont need OOP this time.) I've made an prototype code, but I know that it's wrong. java.h #ifndef J...
[3 replies] Last: Thanks, JLBorges and long double main ! (But the second answer is a... (by iQChange)
by mifum
stringstream how to use and read documentation
 
Hi all, as introduced before, I am a beginner about C++. I'm studing this tutorial http://www.cplusplus.com/doc/tutorial/structures/ and I don't understand re...
[4 replies] Last: Well, some of it is technical stuff that probably won't be of any inte... (by long double main)
main() calling itself
 
I keep on reading that main() is not allowed to call itself, yet the following code works for me: #include <iostream> int main(void) { using std::cout...
[1 reply] : This sums it up nicely: http://stackoverflow.com/questions/2128321/can... (by long double main)
by h4ever
error std::ostream_iterator undeclared identifier
 
Can you help with this error? line 31: error C2065: 'ostream_iterator' : undeclared identifier line 31: error C2062: type 'int' unexpected but std::ostream_it...
[2 replies] Last: thank you (by h4ever)
by ivan1
2d array call in function reading 1d array
 
Hi all, I have the following code: int array = { {1,0,0,0,0,0,0,0,0,0,0,0}, {1,0,0,1,0,0,0,0,0,0,0,0}, {1,0,0,0,0,0,0,0,1,0,0,0}, ...
[2 replies] Last: void Calculate() { for (int i = 0; i < 4; i++) { resu... (by Chervil)
Function needed
 
i wrote this code that takes members info ( name , company , mobile ) and sorts this info. i need function to do this task Mobile starts by 010 be ...
[4 replies] Last: Hey Guys ... need help here !!!! (by Mohammed Khalid)
Help about my first program
 
Im using a book C++ for 21 day and im having troubles about my first program. #include <iostream> int main(); { cout << "Zdravo svete!\n" ...
[2 replies] Last: You would also have to do one of two things. Include this code here ... (by Garion)
GOTO
 
Its not good coding if you use goto but why in my project i used goto plenty of times it has only made my program easier to code and uses fewer lines of code th...
[3 replies] Last: Thank you :) (by Sharan123)
error: expected ';' before 'Gname'
 
I keep on getting this error: expected ';' before 'Gname'| but before int main() #include "main.h" #include <iostream> int main() { int Gnam...
[2 replies] Last: Thanks! (by shiny21)
Question on using structs and functions
 
I have been working on a project for a programming class. The problem is as follows: "Write a program to help a local restaurant automate its breakfast bill...
[2 replies] Last: 1.-I forgot if you want to do the switch whitout classes here is the e... (by Edevan)
Question regarding system-wide Hotkeys and disabling keydown autorepeat
 
Hello, I'm trying to write a program which will use hotkeys to capture user key events and turn them into key up/key down events. Here is what I would li...
[no replies]
November 2013 Pages: 123... 80
  Archived months: [oct2013] [dec2013]

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