Beginners - February 2019 (Page 7)

Error in the returning of a pointer char function
 
Hello, I am supposed to make the strcat_s function on my own. This is the code I have made until now #include <iostream> using namespace std; char *str...
[3 replies] Last: Thanks for the replies, guys! :) I got it working by this code, #i... (by redfury)
.txt to 2d array
 
The code doesn't show any errors but doesn't show any results also #include <iostream> #include <fstream> #include <string> using namespace std; int main() {...
[4 replies] Last: Thank you so much (by Jack Van Stone)
by kmce
ifstream, reading from text file
 
Hi, I have a lab in which I was tasked with using ifstream to read data from a file. Ive never used this before, so being tasked with more than just reading fro...
[6 replies] Last: Line 7: getline() is going to read the whole line into line, so line ... (by AbstractionAnon)
reading from a .txt file
 
The code is supposed to tell the number of lines in a .txt file and show it contents line by line #include <iostream> #include <fstream> #include <string> usi...
[2 replies] Last: I am so sorry for not using the code tags Thank you very much, your ... (by Jack Van Stone)
.txt to c++
 
I am trying to convert a .txt file to an array in c++. The problem is the text file contains: a letter a number a letter a letter a letter a number a lette...
[4 replies] Last: Problem solved, thank you, guys (by Jack Van Stone)
rand() random numbers between 1-10 but not allow specific numbers
 
Hello together, i know how to use rand() but is it possible to generate random numbers from 1-10 but dont allow number 9?
[16 replies] Last: [quote=dutch]I've noticed you saying a number of stupid things. You ar... (by Grime)
Help with Arrays
 
Hello guys, i need help with some arrays. So first of all i have global arrays, for example Square = {'1', '2', // and like that then i have a...
[5 replies] Last: to reset square, consider... const char orig = {'1','2','3'}; //you c... (by jonnin)
OOP C++ Classes (1,2)
 
Hi all, We're doing classes in CPP at my course right now using OOP and Im a bit lost with them. I understand the whole process - I think, but I just cant seem...
[26 replies] Last: Hah thanks! I guess. I was just having trouble understanding the proce... (by wirelesskill)
c++ structure
 
Lost original Post Hello Daniel SHobe, And your question or problem is? One possible answer is 42 https://www.youtube.com/watch?v=aboZctrHfK8 Also look at h...
[7 replies] Last: So an account gets banned after it gets two of its posts reported? Tha... (by Grime)
What is worng with my line writing code?
 
My code does not allow me to enter the string I want to copy. The first line is how many times it is copied and the second line is the string to be printed. ...
[1 reply] : Use cin.getline(), newer compilers don't have gets() in <cstdio> (C++1... (by Grime)
Problem in swapping of array indexes
 
Hello, I was supposed to make a student database. I have made the code however, there is one problem which I am facing and I have been unable to solve it. The...
[2 replies] Last: Oh, God! I didn't put a '=' there, I instead put a '-' there.. It was... (by redfury)
by odo
'C' Recursive -Hanoi towers- Any help to understand
 
debug that and really i cant understand why we put return in a void fonc. . and how can it recurse any help to understand? /* Exercise 5.39 solution */...
[2 replies] Last: im tryng thks (by odo)
equal in algorithm.h and userdefined equal
 
Hello guys, i wanted to ask what differences there are between this userdefined equal bool bool equal(const string& a, const string& b) { if (a...
[2 replies] Last: Your user-defined function will test for equality regardless of case ... (by lastchance)
by Bopaki
I have a program with all the seven files together and it runs fine
 
I also have a project with all the files defined there and it gives error messages: main.cpp:159: undefined reference to 'candidateType::candidateType::getTota...
[2 replies] Last: I noticed this, you're declaring temp, candidateType temp; , and neve... (by Grime)
Difficulty determining a winner in tic tac toe.
 
Good evening, I am working on a simple tic tac toe game. I have written code that prints out a menu, asks the players to start the game, prints a playing boa...
[2 replies] Last: Grime, Thank you very much that did the trick. I was not thinking tha... (by orlando2189)
by yat89
partial_sum of 2d vector
 
Hi everyone, I'm new to c++ programming. I need to compute partial sum for the 2d vector. I had try to coded it but errors occurred. Hope anyone can help me. T...
[7 replies] Last: Oh, that why i can't get the result. I didn't reserve space for the re... (by yat89)
Ascending order
 
I'm doing an assignment for my CSC class and the instructor has asked us to: 1. Ask for three numbers 2. Determine the smallest number 3. ...
[2 replies] Last: Hello BIGB185, If you do not want to rewrite your program as JLBorges... (by Handy Andy)
by box231
why is this boroken?
 
#if _GLIBCXX_HAVE_WCHAR_H #include <wchar.h> #endif #ifndef _GLIBCXX_CWCHAR #define _GLIBCXX_CWCHAR 1 // Need to do a bit of trickery here with mbstate_t as c...
[3 replies] Last: Go to the CB compiler settings and make sure it is set to be using the... (by Duthomhas)
Set up variable in const char?
 
I'm currently following this example and trying to experiment with the code to see if I can get it to perform the functions I want: https://github.com/curl/c...
[2 replies] Last: Oh sorry about that. I misunderstood the concept and the certificate i... (by Monzaku)
Using rand and while loops for Selection Menus?
 
Hello, I am in need of assistance on how to correctly output a selection menu using the rand function and while loops. I aim to have the line of code randomly o...
[2 replies] Last: Hello Dylanblitz, PLEASE ALWAYS USE CODE TAGS (the <> formatting bu... (by Handy Andy)
February 2019 Pages: 1... 56789... 23
  Archived months: [jan2019] [mar2019]

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