Beginners - July 2015 (Page 17)

Subscript requires array or pointer type
 
Hello everyone, I could really use your help. I am confused about this error that I'm getting. I reread the chapter on pointers and arrays, but I'm still lost....
[2 replies] Last: The c2109 error is on line 12. I also just noticed the typo on line 12... (by CpluspProgrammer)
One of my calculations is coming out incorrect. Please help me spot my error
 
This is the problem I am doing: "Ask for user's height (in.), weight (lbs), & age (yrs); then compute sizes according to formulas: -Hat size=(weight/height)...
[1 reply] : For lines 19 and 22 I get, warning: the omitted middle operand in ?: w... (by CodeWriter)
by Filorn
power of a number
 
How can i make the power of a number??? I just tried x^2 but it doesn't work. Is the problem in the sign?
[3 replies] Last: I hope that it would be helpful through an example - #include<stdio... (by appi)
by Filorn
#ifndef
 
There are two errors at the lines 3 and 4: expected '}' at the end of input unterminated #ifndef #include <stdio.h> #define NUMERO 4 int main(void){ ...
[2 replies] Last: were u wanted to do this thing ?? #include <stdio.h> #define NUMERO ... (by appi)
Dynamic character array
 
Attempting to dynamically allocate a name to a character array and getting very confused. Here is where I am at the moment: Apologies for the awful code and ...
[1 reply] : If you just want to read a string, there is a string class. #include... (by kbw)
Read and write binary?
 
I've only recently started to work in C++, so I'm not quite adept to it yet. What I was trying to do is to make is read bytes from multiple files and write the...
[3 replies] Last: Mmm, not sure what's going on. The thing to do is print the values of... (by kbw)
by cnb91
Sum of specific integers in .txt file
 
Hi! I haven't done a lot of coding before, but now I'm working on this budget/accounting-program. My first goal is to develop a program were the user puts in a...
[4 replies] Last: Anyone? :) (by cnb91)
by Filorn
quick sort algorithm
 
this is the quick sort algorithm but it doesn't work as it should work. #include<stdio.h> #include<stdlib.h> // Procedura per lo scambio dei valori tra ...
[2 replies] Last: Line 46 is where the error is happening. Change it to this: qSort (v... (by Wyboth)
I/O user friendly file name
 
Hi I'm new to C++. I was practicing some programs. And I was wondering for the follwing program, is it possible to name the output text file on users choice? ...
[1 reply] : Sure, but you must follow the cardinal rule of user input:      ... (by Duthomhas)
Prefixing #defined string with variable.
 
I have inherited a legacy (1990s) Visual C++ (that is really just C) suite of programs that contain loads of defines (in #include files) such as #define Dia...
[4 replies] Last: Now that I understand it. I know why it has to be MAX_PATH long. Havi... (by AdrianFK)
Help with Data Structures and Sorting and Searching
 
Ok I am working on a project that says to write a program that inputs (at most 50) records from a sequential file. The file may contain fewer than 50 records. T...
[3 replies] Last: Have a look at the integer values corresponding to ASCII characters: h... (by Wyboth)
initialize user-defined objects using lamda expression
 
Hello forum, I have declared smart pointer as follows: std::vector<std::shared_ptr<Line>> lines_; std::vector<std::shared_ptr<Line>> edg...
[4 replies] Last: Pass by reference: we want to modify the object in the vector. // st... (by JLBorges)
Cannot find a way to replace all the characters
 
write a program that reads in a line consisting of a student's name, social security number, user id, and password. the program outputs the string in which all ...
[4 replies] Last: You can use string.length() and replace to do it. Just like what you d... (by funprogrammer)
SEARCHING THROUGH VECTOR AND RETURNING IF WORD IS FOUND!!
 
Can someone fix my code !! I need help with searching through my vector for a word and return it as found #include <iostream> #include <fstream> #incl...
[1 reply] : Please don't multiple post. On line 68 you have a return, and on line... (by koothkeeper)
the code can not work continuously
 
run the code with codeblocks there comes the "nan" #include<iostream> #include<fstream> #include<sstream> #include<string> #include<iomanip> #include<c...
[2 replies] Last: Not a freaking comment, all your variables are global with names of no... (by ne555)
Keylogger problem (some characters)
 
Hello, I have this keylogger code.. works fine.. but I have a problem to get characters 'composed', for example @ (in my keyboards is Alt Gr and ò button. ...
[no replies]
by eons93
I'm back and only with 52 errors this time :D
 
I've spent a couple hours revamping, simplifying and correcting some mistakes. currently, im confused with errors talking about "'_name': is not a member of 'Mo...
[9 replies] Last: so i need to add "#include <string>" to my .h files? I have string in... (by cire)
Function pointers as function arguments
 
Hello, I am a beginner at c++. I am trying to figure out how to write this program. I have been stuck for days, any help would be greatly appreciated. Here is ...
[8 replies] Last: Wow thanks a bunch!!!! (by mchillington)
Order By Age Program
 
Hello, I just started learning C++ and I have to make a program that says who is the oldest person from a list of persons. I made a class Pers where i defined t...
[3 replies] Last: Rather than use char arrays Keep in mind that the word 'array' is n... (by closed account 48T7M4Gy)
Print Out Not Coming Out Correctly
 
I cannot get this to print out correctly, when there is a tie in the game of tic tac toe. When there is a tie, it prints out both if (finished == 'x') ...
[4 replies] Last: its still not printing out correctly. Spook to soon. NO idea why it is... (by holy9ner)
July 2015 Pages: 1... 1516171819... 33
  Archived months: [jun2015] [aug2015]

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