General C++ Programming - July 2014 (Page 8)

Macros in C - Basic question
 
#define A 5 #define TWICE_A (2*A) Can I use TWICE_A as above? Will the preprocessor direct...
[1 reply] : Works with the online compiler attached to this site. http://cpp.sh/4... (by wildblue)
proper way of using string array inside a class
 
class myclass{ string myarray ; myarray = "one"; myarray = "two"; myarray = "three"; myarra...
[4 replies] Last: thanks programmerdog297 I got it, thankyou very much. :) (by danicpp)
linked list pass by address error
 
#include <iostream> using namespace std; struct node { int data; node*next; }; void add(node**...
[5 replies] Last: To delete all nodes you created. Loop by your List and use delete fr... (by lsk)
Military & Standard Time
 
I've search the web, and solved all the errors that appeared till I got a clean build. Now any ti...
[2 replies] Last: Thank you giblit. I can't believe I didn't notice this before, guess... (by closed account ybo2y60M)
Tic-Tac-Toe problem
 
I am following a tutorial for C++ where it is split into chapters, and at the end of the chapters, t...
[3 replies] Last: isk, it was the suppose to be announceWinner(winner(board), computer, ... (by atf1999)
Checking if variables are pairwise distinct
 
If I want to check if all the variables are pairwise distinct, i.e. they're all different. Here's a ...
[8 replies] Last: Duoas' method is very simple and it is the one I'll use, the other one... (by gameprogrammer)
Char Array Vs Strings
 
Ok, So I'm trying to solve a problem which is supposed to run in less than 3.5 seconds. Using sa...
[7 replies] Last: Yes, This is a codechef question indeed, how'd you figure out? :D And ... (by newbie456)
Running a program outside ide
 
Hey after you have compiled a program can you run it without an IDE?
[17 replies] Last: By owner I didn't mean the person that is meant to posses to folder. T... (by Computergeek01)
Sending and receiving data
 
Hey all! If I have a text file named, stuff at a specified path in the c : drive, how do I send the ...
[5 replies] Last: @ discofire : I like that description much more, it feels more concis... (by Computergeek01)
by bonho
try to understand this example code
 
I looked for a general way to get a function that does a sync/async "wait x sec and do something" an...
[2 replies] Last: [quote=bonho]why does it call detach? [quote=kbw]detach() is called a... (by cire)
I am facing the problem with goto statement
 
#include<iostream> #include<string> using namespace std; int main() { int i,j; int begin = 0; s...
[1 reply] : It is. You find "*/" at position 6 so when the first loop looks for " ... (by Peter87)
String is being output backwards...
 
Hi! So I have a program that will convert a string of numbers into a barcode that consists of :'s an...
[6 replies] Last: #include <iostream> #include <cctype> #include <string> using namespa... (by Yanson)
by q139
string to LPVOID
 
Hello, I have problem converting string to lpvoid. It does convert but if input is "0x00309E40" ou...
[5 replies] Last: Thanks alot, now i am able to enter adress and pointer. Now i have pr... (by q139)
How to add the time into function
 
I have created this code with the classes for time and message. Basically the point of this code is ...
[2 replies] Last: This is how the time will be displayed!. Just a little modification of... (by Atyab)
Keylogger
 
Hey all! So im trying to make a keylogger. So far this is what i came up with: #include<iostream> ...
[14 replies] Last: Woah! Dude that's cool but I don't think I'll be able to finish it up ... (by Thedevilstail)
by Rina
Upgrading program in Visual C++ 6.0 to Visual C++ 2010
 
Hi, I have a program that is written in Visual C++ 6.0. This program is using static library. Whe...
[1 reply] : you are looking for the stdafx.h at one level up the project directory... (by writetonsharma)
Compelling use of Friends?
 
Hey guys, This is more of a general question. Have you ever encountered a scenario where friend f...
[5 replies] Last: Friends are probably a last resort. -1. Friends are part of a class'... (by Duthomhas)
A struct inside a class?
 
I'm getting confused. If I have a class declared in class.h and defined in header.h like below. I'...
[6 replies] Last: Okay, I see. Like Cubbi said, you can use :: to access what you decl... (by lsk)
Using Global Variables in a Static Library
 
Currently I can't test it, that's why I'm asking :) Is it possible to use & change global variabl...
[3 replies] Last: When you include the file that contains the function, won't you have t... (by lsk)
by tcmn
help understanding how to interpret a function
 
I was asked to write a function : int solution(const vector<int> &A)that, given a zero-indexed arra...
[5 replies] Last: I too sent the wrong example. Here is the example: array A consisting... (by tcmn)
July 2014 Pages: 1... 678910... 26
  Archived months: [jun2014] [aug2014]

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