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...
Nov 30, 2013 at 11:30pm
[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...
Nov 30, 2013 at 11:12pm
[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,...
Nov 30, 2013 at 10:59pm
[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...
Nov 30, 2013 at 10:57pm
[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...
Nov 30, 2013 at 10:54pm
[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...
Nov 30, 2013 at 10:42pm
[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 ...
Nov 30, 2013 at 10:34pm
[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...
Nov 30, 2013 at 10:26pm
[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...
Nov 30, 2013 at 10:15pm
[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...
Nov 30, 2013 at 10:10pm
[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...
Nov 30, 2013 at 10:08pm
[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...
Nov 30, 2013 at 9:45pm
[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...
Nov 30, 2013 at 9:28pm
[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}, ...
Nov 30, 2013 at 9:25pm
[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 ...
Nov 30, 2013 at 9:23pm
[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" ...
Nov 30, 2013 at 9:17pm
[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...
Nov 30, 2013 at 9:13pm
[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...
Nov 30, 2013 at 9:10pm
[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...
Nov 30, 2013 at 9:06pm
[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...
Nov 30, 2013 at 8:52pm
[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.
Registered users can post in this forum.