General C++ Programming - April 2022 (Page 3)

Access violation error when using Hazel
I was following a youtube video on using Hazel and I have everyday installed quite OK. However I encounter an except...
[12 replies] Last: Update: @Ganado, I just managed to isolate the problem code section! W... (by kayceeken)
by pmah
File manipulation
Hello, I am a newbie in c++. I have done file copy program which copies two file and makes new file to write. But this has limitations, it doesn't consider whit...
[4 replies] Last: To read a file into a vector and then display: #include <iostream> ... (by seeplus)
how use BITMAPINFO? why is BGR() instead RGB()?
heres how i use BITMAPINFO: BitInfo.bmiHeader.biSize = sizeof(BitInfo.bmiHeader); BitInfo.bmiHeader.biWidth = Width; BitInfo.bmiHead...
[10 replies] Last: microsoft has _byteswap*** family of functions. If I am not mistaken, ... (by jonnin)
how send a function array parameter?
heres how i call the function: unsigned int PixelColors ; // draw a line: DrawLine3D(PixelColors,RotOrigin,RotDestination, RGB(0,255,0) ); the funct...
[16 replies] Last: thanks for the correction to all.. thank you (by Cambalinho)
how convert a 2D vector to void*?
how can i convert 2D vector to void*? creating a 2D vector: std::vector<std::vector<unsigned int>> PixelColors( ConsoleHeight , std::vector<unsigned int> (Co...
[13 replies] Last: ganado.. thanks for the correction ;) (by Cambalinho)
by Squabs
Arrays with outputFilles.
So I have the function for choice 2 at the bottom of the program and I'm trying to implement it into the code so its functioning correctly. Also I'm trying to i...
[4 replies] Last: // Input user selection. cin >> userChoice; ... (by jlb)
by Cplusc
Reading Text File
I want to read a text file using following function, This functions are in class Mesh which takes std::string mesh_name in the constructor. Also the mesh name_ ...
[10 replies] Last: Unless I'm missing something re the input file, this seems vastly over... (by seeplus)
by frek
push_back and emplace_back
Hi all, I know, say, for an std::vector, push_back(x) means to copy or move x to the end of the vector and emplace_back(x) means to construct x at the end ...
[5 replies] Last: > So for built-in types, there's no difference between the two, yeah? ... (by JLBorges)
declaring an iterator inside a templated function
Hey yall, so for one of my projects I've been assigned to do some templated functions for vectors that use iterators. I can do it every other way, and maybe I'm...
[2 replies] Last: ah ok that makes a lot of sense haha, i guess i was way overthinking i... (by dorito200)
How can i fix this line?
unsigned Sum(vector<int> GivenVector) { //stuff } is giving me the following errors: Calculate.cpp:50:14: error: ‘vector’ was not declared in thi...
[1 reply] : #include vector and use std::vector to get the proper namespace or a... (by jonnin)
how use memset()?
how i use memset()? heres my actual code: if(Pixels==NULL)VirtualFree(Pixels, 0,MEM_RELEASE);; unsigned int PixelsCount =SizeWidth*SizeHeight*size...
[8 replies] Last: the best shot was realy: std::fill(Pixels, Pixels + SizeWidth * SizeH... (by Cambalinho)
how convert a 1D array to 2D and get it's size?
heres the array: void *BufferMemory; int BufferSize = ConsoleWidth * ConsoleHeight * sizeof(unsigned int); if(BufferMemory) VirtualFree(BufferMemory, ...
[10 replies] Last: unsigned int PixelColors ; This is not standard C++. In standard... (by seeplus)
data align issue
I am trying to solve problem mentioned in the below link using CPP. Any comments?
[3 replies] Last: From your SO link: * A data stream contains a binary stream of data ... (by DizzyDon)
by Cplusc
MPI_Aint_diff is undefined
I'm trying to run the following code in my PC but I get MPI_Aint_diff undefined. I included the correct platform of mpi library but still I'm getting this error...
[7 replies] Last: @lastchance I didn't get how how can I send ints and doubles separatel... (by Cplusc)
by pmah
Concatenating string
I have an expression: const char* client_name = "client"+ std::to_string(getpid()) But I get error like below: client.cpp:54:20: error: invalid convers...
[5 replies] Last: std::string::c_str() gives you the pointer to the internal buffer of... (by kigar64551)
by pmah
I am a new first semester student. I wanted to work with OOP. I have a question, how can I make one class function accessible by another ? Below is my code: ...
[3 replies] Last: The issue is that src is defined locally in function input() - so can'... (by seeplus)
CodeBlocks IDE: can i make function descriptions?
using the CodeBlocks IDE, can i create a Functions Descritpions?
[no replies]
how calculate values from 1D array?
see these code: void *BufferMemory; int BufferSize = ConsoleWidth * ConsoleHeight * sizeof(unsigned int); if(BufferMemory) VirtualFree(BufferMemory,...
[2 replies] Last: understand... thank you so much for all... now i need create a new top... (by Cambalinho)
Well it looks like this Except for the scrawled in the ...
[5 replies] Last: Instead of providing what was asked for, OP has deleted his post again... (by AbstractionAnon)
ADT IteratedList - represented using a DLL
Hey! I need help with my assigment and i don't know where to start with the implementation part, can somebody give me any resources or advice? IteratedList....
[3 replies] Last: The code you posted looks like it's been word-wrapped. Is your copy c... (by dhayden)
April 2022 Pages: 1234
  Archived months: [mar2022] [may2022]

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