General C++ Programming - May 2015 (Page 22)

friend function
 
how to make this: ---- 1 0 1 2 x 1 1 1 ---- 1 0 1 or this: 1 0 1 1 1 1 x 2 1 0 1 note: this two types must be work in main, ignore the ----
[7 replies] Last: i have make it, but it stuck, so i should know how the truth (by Charves)
by yj1214
Is it possible to make a sound using only standard c++ libraries?
 
It seems like libraries such as PortAudio and STK doesn't support MinGW for Windows. So I was wondering if C++ standard libraries support audio programming. I k...
[7 replies] Last: Glad to hear it! For how important libraries are it is quite interesti... (by ultifinitus)
About namespace, enum, typedef, and file access
 
Please be brief and don't use deep terms that mostly make questions more complicated. So first, when is it necessary to use enum, typedef, and namespace? What ...
[1 reply] : Do each of them provide any other benefits? Are they necessary to mas... (by Gamer2015)
Trying to find the longest and shortest words from a .txt file, PLEASE HELP!
 
I have tried a few different things, this was my start point #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> #include <fst...
[1 reply] : Read the first word and set it to longest and shortest. Then read the ... (by naraku9333)
by Htran
help on poker program
 
Write a program that will operate on a deck of 52 cards. Your program will: 1. Deal them into four random hands of 5 cards each a. The four hands need to be k...
[2 replies] Last: Have a look at this thread: http://www.cplusplus.com/forum/beginner/1... (by AbstractionAnon)
char* to char array
 
I need to send "%setmem% 0x00000000, { 0x00, 0x00 }" to a C++ client but I need the bytes to be in a char* (string) so I pretty much need it like this:...
[1 reply] : The safest way would be to create a std::string, add all of the compon... (by doug4)
Program error
 
I have problem in this program, Did not get how I fix this run time error, I am trying to make Josephus game BUT run time error is occurring, please help me to ...
[1 reply] : Please do not double post. http://www.cplusplus.com/forum/beginner/1... (by AbstractionAnon)
C++ Variable type of argument
 
Hello, I wants to write one function which pass its variable type of arguments to another function. e.g. MyPrintf call printf of C but it accepts variable type...
[2 replies] Last: Yes, you can crate a va_list and call vprintf. http://www.cplusplus.... (by AbstractionAnon)
Vectors and Loops
 
I am getting an error saying expected primary expression before void. This is my assignment. Hopefully I am doing this right but I am having trouble with this e...
[2 replies] Last: thank you so much I ran the code and it compiled successfully this is ... (by mmiller03)
Question about Operator "<<"
 
//-------------------------------------------------------------- void GameManager::LoadLevel(std::string filename) { std::string txtname; std::ifstream in; i...
[5 replies] Last: in>>txtname will read the next word in the file and store it in txtnam... (by Peter87)
by taja
Recursion
 
Hello, I need some help with this problem. I am not proficient in C++ and need some advice Here are the instructions: The Power function calculates the po...
[5 replies] Last: Ok, I figured it out. Thanks for your help. (by taja)
Error Message
 
Hey guys, I am getting an error message that say my first "userval=read_element();" is not valid since "read_element();" is supposedly not declared in the scope...
[1 reply] : If the compiler says it is not declared in the scope, then you'd bette... (by Texan40)
Library for using the Master File Table HELP!!!!
 
Hello in need help, im trying to do a file recovery, but i dont know what library use to comunicate whit the Master File Table, i hope you can respond to me i w...
[2 replies] Last: OK i will give it a try thanks for your help (by omarmis)
Sockets programming
 
Hello :) I am new to socket programming.My question is this: If a Client wants to be able to connect to multiple Servers then he needs to call connect as many ...
[1 reply] : That will do just fine captain. (by ultifinitus)
Problem with function returning uuid_t
 
Can someone help me with this? #include <uuid/uuid.h> uuid_t getUuid() { uuid_t uuid; uuid_generate(uuid); return uuid; } ../main.cpp:10:16: error: ...
[2 replies] Last: Thank you for the answer. I have got a segmentation fault, but I have... (by stefan65)
Question about if() Statement
 
//------------------------------------------------------- case WM_KEYDOWN: // Key down vkKeys = true; switch (wParam) { case VK_SHIFT: // Shift key nVirt...
[2 replies] Last: Ok, now I understand it. Think you (by zhuzhanhao1991)
friend operator overloading function
 
help, how to multiply matrix with integer and integer with matrix? example: (matrix)x 2 and 2 x (matrix)
[no replies]
by ahoha
write in one row
 
Hi I'm writing a program to do the following : it'll write the names, IDs, etc for people in a predefined txt file, the problem is, I need to write some informa...
[3 replies] Last: #include <iostream> #include <string> #include <fstream> void print(... (by JLBorges)
by tvv
operator overloading
 
Can operator overloading be done on structures.
[3 replies] Last: First, realize that a "struct" and a "class" are the same thing in C++... (by Ganado)
May 2015 Pages: 1... 202122
  Archived months: [apr2015] [jun2015]

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