General C++ Programming - February 2020 (Page 3)

Getting errors when i'm using scanf
 
Hello guys, i'm new here, i want to learn c++. I worked for about 3 hours and i have a problem with scanf, can anyone explain to me? source code: #include <io...
[4 replies] Last: Thanks for help, i resolved. Have a good night! (by simpleScript2k20)
Getting errors when using enum
 
Im trying to setup enum for the name of the coffee in my struct but I keep getting an invalid use code. What am I doing wrong? Thank you. #include <iostre...
[7 replies] Last: #include <iostream> #include <string> int main() { std::string c... (by againtry)
by Dee5
Java to c++
 
Sorry I know Java more than c++ and I did this challenge given to me in Java but its suppose to be in c++. If there is anyone that is experienced in both Java ...
[13 replies] Last: Do you need to get your strings stored in an array of sort or not? Sho... (by Enoizat)
How do you solve these problems using algorithms
 
I've been in this USACO training camp, and there are quite a few problems that I don't know how to solve and I want to know how to solve as USACO is coming up s...
[12 replies] Last: is robot posting spam link with gibberish AI generated nonsense floati... (by jonnin)
MS vc library that apart between directory path
 
What function in MS vc library (Visual Studio environment) that apart between path of the directory containing a filename and filename itself //...sort of : c...
[7 replies] Last: Some of the built-in commands are still awful at accepting /, e.g. ty... (by Ganado)
by volang
SOCKET Sending data
 
Let's say I use winsock send() to send e.g. 500mb in one send. These 500mb, are they all sent to the user even if the user/client/browser only has a buffer siz...
[7 replies] Last: Thanks for answers) (by Bra599)
by Dee5
Finding and replacing duplicates in string (1,2)
 
Hey guys, I'm trying to make a program which will count the number of unique words in sting then finding the duplicates words and replace them to make them all ...
[37 replies] Last: nameslist is an array, it does not have a a "nameslist.length". Use no... (by Ganado)
by Slee p
How to store string in array?
 
Fairly new to classes, so sorry in advance. I need to store fruit names e.g. apple & banana in an array, but I'm not sure where/how to set these strings in an a...
[3 replies] Last: You should be doing something like this. Note that I made a few change... (by againtry)
can't print unicode characters
 
I can't print the chess symbols on the console (♔♕♖...) I've already tried HANDLE cons = GetStdHandle(STD_OUTPUT_HANDLE); wchar_t p = L"Queen: \u2...
[4 replies] Last: I do not know if the limitation existed in previous versions. Setting ... (by Duthomhas)
Please help Debug this program for me
 
#include <cstdint> //To get size info for INT. #include <cfloat> //To get size in for float #include<iostream> using namespace std; int main(int argc, c...
[1 reply] : Welcome! If you want help, help us a bit. put it in code tags <> on t... (by jonnin)
by Dee5
Puzzle hrlp (1,2)
 
Hello guys, I just want to be truthful with you. This is an assignment I was given and I have no idea of where to start. It's about a puzzle Here's the ques...
[26 replies] Last: @Dee5, if you change vector<string> grid(N); for ( int i = 0; i... (by lastchance)
I am making a program to take no. of test cases from user and then input in linked list and print them.
 
this is my code but its not running... #include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; }; Node* push(Node* hea...
[1 reply] : The problem is this: if(head1==NULL) It should be if(head1!=NULL... (by coder777)
by jonnin
for Dutch vectored tree
 
I lost the thread where we were talking about this, but decided to make a crude and rough hack at expressing what I was trying to say. I did not finish the use...
[5 replies] Last: Ah, yes, it is indeed a very useful way to organize a tree, especially... (by Duthomhas)
Weird std::map problem (1,2)
 
I'm running into a weird problem where std::map.at("...") is throwing an out_of_range exception, but when I iterate over the map with an iterator, and when I ...
[28 replies] Last: What a surprise - a pink slip - a Red Shift. (by againtry)
if statements with strings not returning true and entering if statement
 
trying to get the program to close if the user inputs "exit" for filename but the if statement isn't returning true and the code just skips over it (sorry for t...
[2 replies] Last: cool thank you (by SaltySwann)
dir_socket
 
Hi, I am trying to send many images from the same folder via socket. Even though this code runs, there are semantic errors, in fact, the following message sho...
[18 replies] Last: Did it work? (by salem c)
by zongul
Unresolved external symbol
 
I want to create a project and I get an error. This is the code: #include <gwcore.hpp> #include <gw.hpp> #include <tchar.h> #include "test.gfu" int main() ...
[2 replies] Last: > unresolved external symbol _WinMain@16 iirc, that happens when you d... (by ne555)
Help for typedef arrays
 
Hello All For the vptr pointer, is it allocated as or ?? int nshoot = 10; typedef double vect_t ; vect_t *vptr = (vect_t *)malloc(nshoot ...
[6 replies] Last: vptr is a pointer. it is a 'word sized' integer, nothing more. wor... (by jonnin)
C++ on a Watch
 
Brad started programming in BASIC when he was 9, primarily on the Apple IIe, transitioning to QBASIC in high school. He graduated from Kansas State University i...
[no replies]
by zongul
'[': is not a member of 'GwDynArray
 
My compiler says that at this point is an error: T_& operator (int nindex) { return *(T_*)&(GwDynArray::operator (nindex)); } This is the whole block: ...
[5 replies] Last: Is the access to operator correct? I commented the two operator functi... (by zongul)
February 2020 Pages: 12345... 7
  Archived months: [jan2020] [mar2020]

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