Posts
 
Reputation
Joined
Last Seen
Ranked #41
Strength to Increase Rep
+16
Strength to Decrease Rep
-4
97% Quality Score
Upvotes Received
388
Posts with Upvotes
336
Upvoting Members
156
Downvotes Received
13
Posts with Downvotes
10
Downvoting Members
7
171 Commented Posts
~960.35K People Reached
Favorite Forums
Favorite Tags
Member Avatar for mnoizinum

I use apple's x code, my system is OS X 10.4.11 Im getting a warning you must be familiar: [CODE]"#ifdef __DEPRECATED #warning This file includes at least one deprecated or antiquated header. \ Please consider using one of the 32 headers found in section 17.4.1.2 of the \ C++ standard. …

Member Avatar for Dani
0
251
Member Avatar for ssharp77

In need of some help with a programming project which reads text from one file and places it in a 2nd file, which will be identical to the first file with the exception of any string of two or more consecutive blanks being replaced by a single space/blank, eliminating extra …

Member Avatar for Dhushanthan
0
930
Member Avatar for vishalonne

Hello Everybody I want to print the value of alternative element of a 2D array. For Example- 23, 54, 76 37, 19, 28 62, 13, 19 Output should be- 23 76 19 62 19 I am trying to get this output since 5 hours. Here is my code - #include …

Member Avatar for DIVYANSHI MANGAL
0
1K
Member Avatar for stefy14

I want to my program to prompt user to input a number with three or more integers I need the program to output a space between each numebr example: cin>>3334; i want the output to show 3 3 3 4 each with a space and then i also need to …

Member Avatar for amisha_1
0
57K
Member Avatar for Agni

Hi, i have seen a lot of ppl say things like, 'this piece of code is more efficient than the other', 'this gives better performance' or 'more efficient memory wise' etc.. but i fail to understand that how in a normal coding scenario can i find out the efficiency of …

Member Avatar for Magee_1
0
3K
Member Avatar for doug65536

I have a project that uses DirectSound to play streaming sound. I use SetThreadpoolWait to get a threadpool callback every time the notification (AutoReset) events are signalled. (To fill the streaming buffer with more audio). The new Win7 threadpool API requires you to use SetThreadpoolWait to schedule a new wait …

Member Avatar for Klaus_1
0
555
Member Avatar for kylcrow

Hi. I am new to the forum and I had a question. I have looked around and haven't really been able to find exactly what I am looking for. I am looking for the code in C++ to read in a random single line with spaces from a file. This …

Member Avatar for zia shaikh
0
5K
Member Avatar for MedianHansen

At first, here's my source code: [code] #include <SDL.h> int main(int argc, char* argv[]) { //initialize SDL and the video system. if (SDL_Init( SDL_INIT_VIDEO)<0) return -1; //signal SDL to change the text of the main window to SDL "Hello World". SDL_WM_SetCaption("Hello world","Hello World"); //Create an SDL_Surface object, which represents, the …

Member Avatar for Slavik
0
6K
Member Avatar for .It.

Hi all, first thread in here. I usually don't open my executables with any sort of editor, but for the sake of curiosity I've tried opening one. And what I've found is not that funny: I've found myself able to edit every kind of string. Of course you have not …

Member Avatar for overwraith
0
5K
Member Avatar for ddanbe

I recently came accross this code: Mat3D R_z(double RotAngle) { const double S = sin (RotAngle); const double C = cos (RotAngle); Mat3D U; U.m_Mat[0][0] = +C; U.m_Mat[0][1] = +S; U.m_Mat[0][2] = 0.0; U.m_Mat[1][0] = -S; U.m_Mat[1][1] = +C; U.m_Mat[1][2] = 0.0; U.m_Mat[2][0] = 0.0; U.m_Mat[2][1] = 0.0; U.m_Mat[2][2] = …

Member Avatar for ipswitch
0
434
Member Avatar for Anshu27

Hi, I am trying to create a vector of a class which contains ofstream object as one of its member. The problem I am facing is that when I add single element to the vector, it work fine. As soon as I add another element to the vector, it changes …

Member Avatar for Schol-R-LEA
0
747
Member Avatar for Ahmed91za

Hello I'm a freshly new Graduate student of computer technology engineering, i'm interested in C++ as my first step into learning computer science, what books other than Bajarni books do you recommend, i don't like book that are 1000+ pages long, and prefer ones that are straight to the point …

Member Avatar for vijayan121
0
166
Member Avatar for Hector3000

#include <iostream> #include <string> #include <cmath> using namespace std; int main() { string Choice; string On, off; char a = 'A'; int i = 0, j= 0 , NUM = 2 , z = 1; cout << "Please enter 'start' to start the program\n"; cin >> On; if (On == …

Member Avatar for vijayan121
0
187
Member Avatar for jamesjohnson25

import java.util.*; class occult { public static void main(String[] args){ int n = 2; for (int i = 0; ; i++){ if(Integer.toString(i).contains("666")){ if ( n == 1 ) System.out.println(i); n -= 1; } } } } I have written the above java code into c++ . i wanted to know …

Member Avatar for vijayan121
0
510
Member Avatar for nitin1

Hi, Actually, I want to make one Singleton class which will create one instance for one thread. I mean if we have 10 threads, then Singleton will create only one object for one thread. IF same thread will ask for one more instance it will return the same instance. Basically, …

Member Avatar for vijayan121
0
334
Member Avatar for nathan.pavlovsky

Hi all! I am working on creating an SMS language translator (SMS -> real English), and I am having trouble initializing a map for the SMS -> English codes. My code is below: map<string, string> THE_SMS_CODES{ ".02","Your (or my) two cents worth", "10X", "Thanks", "2MI","Too much information", "2U2" ,"To You …

Member Avatar for nathan.pavlovsky
0
661
Member Avatar for tinsaea

In turbo c++,how can i copy a certain file from one drive to the other e.g,the file is located in G:\one ,i want to copy it to C:\tc the file name is "file.txt"...Much love

Member Avatar for vijayan121
0
246
Member Avatar for it@61@sec

Does C++ have predefined text constants / string constant to be used as replacements for digits when testing errorcodes ? An example: if (errcode == 17){ std::cout << "The file already exists!" << std::endl; } To make it more readable I can write: if (errcode == FILE_ALREADY_EXISTS){ std::cout << "File …

Member Avatar for vijayan121
0
213
Member Avatar for Curious Gorge

I'm sorry I keep having these strange problems but there's little I can do about them, they are unpredictable. I managed to fix the last one and I've been able to compile and run my programs. Now however I've run in to the *strangest *of problems, the one described in …

Member Avatar for Curious Gorge
0
319
Member Avatar for Kanoisa

Recently i have come up with the scenario where i need a single class to handle a few different interfaces and i have found a few different approaches to take. I was wondering if anyone has encountered the same situation and can give me any suggestion(s) as to if there …

Member Avatar for Kanoisa
0
281
Member Avatar for nitin1

#include<iostream> using namespace std; int add(int x,int y) { int ans=0; int carry=0; for(int i=0;i<=31;i++) { int p = (1<<i)&x; int q = (1<<i)&y; int r = p ^ q; r = r^(carry<<i); ans = r | ans; if(p&q || p&(carry<<i) || q&(carry<<i)) carry = 1; else carry =0; } …

Member Avatar for rubberman
0
161
Member Avatar for tnd2491

Hello All; I want to display logs in the following format as below:- XY,1,1114,ABCDEF,d1744783-0681-4f0c-adee-83277f5e4b85:286,192.168.33.211\n where:- XY is servername. ABCDE:- UserName. I want to display this specific log from the multiple logs of different server with different name. How to do that using threads ??

Member Avatar for vijayan121
0
175
Member Avatar for David_53

can anyone please explain different with vector::begin() and std::begin() ?? the code is based on the book, Effective Modern C++ item13. #include <iterator> #include <boost/type_index.hpp> using namespace boost::typeindex; #define PRINT_TYPENAME(__param) do { \ std::cout << "param (" << #__param << ") " \ << type_id_with_cvr<decltype(__param)>().pretty_name() \ << std::endl; \ } …

Member Avatar for vijayan121
0
348
Member Avatar for nightcrew

[QUOTE]Assume you have a int variable n that has already been declared and initialized. Its value is the number of integers that need to be read in from standard input and printed out in sorted (ascending) order, each on a line by itself. Furthermore, there are no duplicates in the …

Member Avatar for omgerg
0
3K
Member Avatar for Narue

When you want to remove extraneous characters from an input stream in C++, it's usually because you mixed formatted and unformatted input methods. The formatted method would leave a newline in the stream and the unformatted method would consume it and terminate successfully, but fail completely to do what you …

Member Avatar for Smn
18
13K
Member Avatar for Luisa_1

Hello everybody, I'm searching for a book or a documentation that includes all the librairies ,and their functions, of the C++ programming language. thx

Member Avatar for rubberman
0
175
Member Avatar for kungle

If I (have to) use C/C++, I'm mostly working on time-critical or real-time applications. Examples are OpenGL texture Streaming (Example: Streaming Satalite Data on planet surface in realtime: https://www.youtube.com/watch?v=ws2ra5MvDi4) or real-time PSM audio maonpulation (Example: Automatic tuning a guitar to a C64= SID tremolo: http://www.yousry.de/audio-example-real-time-tune-detection-tuning-auto-tuning/). During development I'm using "**-O0 …

Member Avatar for Maritimo
0
584
Member Avatar for aluhnev

//Hi all,could someone explain the make_shared(), is it used to substitute constructor? //Here is an example void DoAddStaff(vector<Ptr>& container) { cout << "\nEnter type of employee to add ('W' for waged, 'S' for salaried): "; char c; cin >> c; cin.ignore(); if( c == 'w' || c == 'W' ) …

Member Avatar for vijayan121
0
248
Member Avatar for aida.atef.31

Here's the problem (i know it's really easy "it's for beginners") You will be given two numbers X and Y and you will have to define the relation between them. It can be one of the following relations : - X greater than Y. - X smaller than Y. - …

Member Avatar for vijayan121
0
251
Member Avatar for furalise

Hello there everybody... I want to ask if there is a book on creating C++ libraries. I thought a good approach to manipulating and using existing libraries is to learn the intracecies of creating and building them.. Any hints? Thanks.

Member Avatar for Moschops
0
177