General C++ Programming - June 2018 (Page 8)

by Dani90
Problem with calculate complexity
 
Hello ....I have problem with calculate complexity for second loop f=1; x=3; for (int i = 1; i <= n; i*=2) for (int j = 1; j <= i * i; j++) ...
[6 replies] Last: consider the simpler #include <iostream> using namespace std; int m... (by icy1)
by lingfa
memcpy to a data struct not working (1,2)
 
GPS sends well-defined structured data out, for example, Applanix (POS TNG3 and POS LV5) sends Group 1, where latitude and latitude ... count to 132 bytes are d...
[39 replies] Last: My initial thought of this testing is to find an efficient way of proc... (by lingfa)
why this overflow is occurring?
 
Hello guys, I am relatively new to C++ programming but have good experience in PHP. Anyways, I wrote this simple program to check how pointers behave in an arr...
[7 replies] Last: having ++* or *++ being the same thing In this case they are the s... (by doug4)
Show USB devices connected
 
Hello everyone, this is my first post in this forum. I've tried searching but found nothing that solves my doubts. I want to make a program that displays all u...
[5 replies] Last: The main thing are the classes from the .NET framework you need to use... (by Thomas1965)
by texxxo
End of GUI's ?
 
Hello, First of all I'm not a Programmer so i can't programm anything in c++ or other languages but I'm highly intrested in starting learning it! I come fro...
[3 replies] Last: I cringe every time we get a tool that works over the web. Invariably... (by jonnin)
Taking values out of a function to use it in another
 
Hello , I am new to programming and i'm really stuck! Our teacher gave us a problem , i'm so close to finishing it , but the last part says: - "Create a func...
[1 reply] : Sorry for posting twice but it's urgent That makes no sense. If i... (by MikeyBoy)
What happens when you re-order/delete the vector you're iterating through? (1,2)
 
Hey guys, Lets say I have a vector myVector = {1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2}; and I decide to, "For each 1 in the vector, add an additional 2 in the vecto...
[20 replies] Last: given the cited source on Stackoverflow, it seems that if I want to i... (by keskiverto)
by Allaye
way forward
 
hello guys, just need a little help or advice, i just finished the c++ fundamentals and i cant find any meaningful problem to solve with it, i mean a in a cross...
[4 replies] Last: > interested in winapi and networking? cant get hold of any meaningful... (by JLBorges)
by Prummi
Duplicate error, help needed
 
I am making a little command line game and I can't seem to fix this weird error. It says duplicate error of my objects, but I am using #pragma once The full ...
[1 reply] : #pragma once only helps with preventing the same header file from bein... (by Peter87)
How to use .so file in c++ program?
 
i have a .so file in desktop directory. i want to use it in my c++ program.I do not want to use .so file in compilers linker library.I want to use it in my main...
[6 replies] Last: Perhaps you can run ldd on the library to check what its dependencies ... (by kbw)
Templates,pointers and move constructor
 
I have created a pair using templates but I have come across an interesting dilemma,what if we have a pair which has a pointer instead of an int or double or st...
[11 replies] Last: Hi Peter, no I'm using c++11 (by adam2016)
std::vector::erase
 
Hey guys, One more vector related question. I searched the erase-remove idiom document for the answer and I don't think I found my answer. Given vector.erase...
[10 replies] Last: Deleting the last half will be much more efficient. And much easier t... (by Peter87)
Competitive progrsmming
 
https://www.codechef.com/JUNE18B/problems/BINSHFFL this is the problem link please tell how to solve this!
[5 replies] Last: Yes, this is the same problem, go look at that other thread. (by jonnin)
std::remove_if not working properly
 
Hey guys, I have a code snippet that looks like the following: auto overOneHundred = (Person& p){return p.getAge() > 100;}; std::remove_if(std::begin(colo...
[3 replies] Last: Thank you! Kinda new to the STL so this is good to know. (by Aaron Vienneau)
by Auglen
Newer at c++ (actually algorithm)
 
build the program in c ++ that finds the maximum and minimum element for some values given by the keypad. The actions are interrupted when the user places the n...
[7 replies] Last: I see. I tend to avoid breaking out of loops that way unless there i... (by jonnin)
Deck of Cards for Blackjack Algorithm
 
I am trying to make an algorithm that plays blackjack perfectly. My first step is to create the deck of cards. I was thinking something like this: struct car...
[3 replies] Last: > Couldn't we use it as regular function as below, without using frien... (by JLBorges)
by Mnx
Help for errors.
 
#include <string> #include <iostream> #include <cstdlib> #include <cstdio> #include <conio.h> #include <time.h> using namespace std; const ...
[2 replies] Last: You need to check your array boundaries. if (maze[player.y][player.x ... (by Thomas1965)
by sarosi
stringstream
 
I have a project that needs to read an integer of any size between 0 to 20. So I thought I could use stringstream, but whenever the size gets larger than 10, it...
[1 reply] : All the built-in integer types in C++ have fixed sizes so they can onl... (by Peter87)
Access violations writing task scheduler
 
Hello, I am trying to write a task scheduler for an OpenGL engine I am writing. The idea is that I can have a class with pure virtual functions and a get_task...
[1 reply] : I would recommend to use asio (independent library) or boost::asio. As... (by poteto)
variadic macros: can i control the arguments?
 
see these 2 macros: #define event(event1) void event1 #define events(...) event(__VA_ARGS__) //see the sample: events(hello(),hey(int x)); i get an error...
[14 replies] Last: thank you so much for all. now it a little out off topic: can you give... (by Cambalinho)
June 2018 Pages: 1... 6789
  Archived months: [may2018] [jul2018]

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