Ilya
Unsure if it works for classes as well
Sandeep
Vitalii
Sorry, what is the best way to define a template class in a .h file and implement it in a .cpp file?
I saw that ppl include .cpp in main. So, I'm interested how do you all do that
Vitalii
I tried to include .cpp in .h file, but there are errors XD
Ilya
About specializations, put extern template class ClassName<template arguments>; inside hpp file and now you can write the definition of concrete class with concrete template arguments inside cpp
Ehsan
Vitalii
Miquel
Hello! I am programming a project but i have a trouble with a map, in my program i have a function that read a class called 'Sesion' and then i need to insert it into a map<string,Sesion>. I checked just before the map.insert() function which where the values of the pair i was going to insert and everything was ok, but when i use find function to get it back and read data i inserted before there's an element of 'Sesion' which hasn't been inserted within the 'Sesion', it's a map<string, pair<string,string>> an becomes empty when it wasn't. I've got no idea what happens i tried to look for on internet but nothing xdddd
Miquel
Anyone have experienced something like this?
сумбула
when i wanted to add header file into my project in CLion it says CMake cannot find source file. But yesterday it was working good. how can i handle it?
...
Prakhar
#goodgoogling
Ehsan
Miquel
Miquel
Miquel
I actually have noticed that the insert function does the work correctly even though the make_pair() does not save all the data. Note:
Miquel
class Sesion{
private:
BinTree<string> arbol_problemas;
string id;
map<string,pair<string,string>> problemas;
};
Miquel
The last one "problemas" doesn't get passed
Sandeep
Hanz
Ilya
This is why)
Sandeep
This is why)
I meant why do I have to declare it again
Ilya
You have to define, not to declare
Sandeep
Yeah define
Ilya
static int x, y;
declaration
Ilya
int Entity::x;
definition
Sandeep
Miquel
Ali
https://pastebin.com/H9UPfpyh
I want to optimize this local maxima function. It is taking around 292 micro seconds for array length 1000 need to reduce it around 230us something. It is for digital signal processing hence want to reduce the time.
Any suggestions for the same?
Anonymous
good evening everybody
Anonymous
#rose_as_my_girlfriend
Anonymous
Paul
qbasic
It was one of my first ages and ages ago
Anonymous
Today is my
Object oriented programming papar
Anonymous
Plz help me
Ammar
!report
Anonymous
Sorry everyone if you don't like it
N4gu4l
/get cbook
X
hi! while we are comparing strings with strcmp function, how can a string be greater than other?
X
for example, str1 = aaaaaaa & str2 = z
X
however, strcmp(str1, str2) will return <0 ; how its possible?
X
as ascii codes ||| aaaaaaaa = a(97)*9 , but z = 122
X
so, str1 = 873 length & str2 = 122 length... how can str1 be lower than str2? !!!!!! 😡😡😡
Huon
Hi
Huon
I want to learn project in dev c++
Suka
however, strcmp(str1, str2) will return <0 ; how its possible?
because a < z.
Compare two strings
Compares the C string str1 to the C string str2.
This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs until the characters differ or until a terminating null-character is reached.
https://www.cplusplus.com/reference/cstring/strcmp/
X
Suka
Aseem
Guys I need a compiler for windows 32 bit for C
Anyone??
Suka
Devjit
I
Devjit
Devjit
Alishba
Can we hard code multiple values of class in the constructor In c++
Alishba
I mean if I have to store values worth an array
Yusuf
Hi guys, have you tried Rust? What do you think about that language? Will it replace C/C++ in the future?
I asked here because I will get answer from people with some experience in C/C++ before using Rust. (is this off topic?)
сумбула
German
A superb developer should certainly know his way through both legacy and modern code
Mar!o
Mar!o
Anonymous
YOU ARE NOT THE REAL ROSE
Anonymous
/notes
Anonymous
Wtf they identical o.o
Mar!o
I've written a lot of Rust and it has some great features. But replacing C/C++ is impossible because there are too many C/C++ programmers and too much legacy code.
Anonymous
HOW??????
Mar!o
Nameful
Nameful
You can use raw pointers if you want to. Just not in safe code
Anonymous
But no one typed it
Mar!o
Anonymous
Anonymous
Oof, how will we ever make linkers in future rust
Mar!o
Cus no pointers?
No if I want to use raw pointer I can use C. I would use Rust for safety.