49,757 Topics

Member Avatar for
Member Avatar for KAY111

Hey, I just discovered a very interesting phenomenon. I have 2 programs. m.cpp [CODE] #include <iostream> #include<time.h> using namespace std; int main() { int a=34,b=40; while(1) { usleep(400000); cout<<a<<" "<<b<<"\n"; } } [/CODE] and n.cpp [CODE] #include<iostream> #include<stdlib.h> using namespace std; int main() { int a,b; while(1) { cin>>a>>b; cout<<a<<b; …

Member Avatar for L7Sqr
0
170
Member Avatar for tomtetlaw

I've registered my raw input devices successfully but Windows doesn't send me the WM_INPUT message when I press keys or do things with the mouse. I am using an event hook to get the messages since I'm using SDL and it receives other messages fine. This is the code I …

Member Avatar for tomtetlaw
0
1K
Member Avatar for CodeGuy

Hi, I'm new here. I'm using log4cpp as a data logger for my program. Does anyone konw how to add a collumn header for logs files created using log4cpp?? I'm using the Rolling file appender which rolls over log files after a defined file size is reached. I would like …

Member Avatar for Ancient Dragon
0
195
Member Avatar for tomtetlaw

I am trying to use SDL with the Raw Input API but whenever SDL sends me a keyboard input message, the [icode]msg[/icode] it sends me is an invalid pointer and it gives me an access violation when I try to use it. I check to see if it's invalid for …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for merse

Are there ay freely available language library? I need class of LETTER, WORD, SENTANCE, TEXT, ... for example a letter can be more than one character, like sch in German WORD category has to be stored, like noun/adjective etc. I have to write my own package?

Member Avatar for merse
0
87
Member Avatar for mirkuh

Hi, I want to call CTest's StaticMethod via a function pointer from Class CCaller. I noticed that StaticMethod is not inlined and the call takes much more time compared to calling the function directly. When calling directly the function gets inlined - even without the inline keyword. Can't the function …

Member Avatar for JasonHippy
0
407
Member Avatar for Kiah07

I need some help with some code. I'm using boost filesystem library V3 c++. I am using an iterator to list files and directories recursively. My program runs perfectly until it scans the "System Volume Information" directory on Windows machines. At that point the program throws an exception because it …

Member Avatar for pseudorandom21
0
506
Member Avatar for Komerad

Hi I found this piece in another "solved" threat. The person that wrote this however had a different problem with it. I changed the bar size value from 12 to 6500. For me this works but has a major flaw : When : lengths to cut < size of a …

Member Avatar for Komerad
0
1K
Member Avatar for AW8Dragon

Hello, got a question that has been bugging me For example there is this text file: Name: yyyy mm dd Phone: Email: Andrew 1989 5 8 123459886 somethin@ Emma 1988 1 30 256497565 other@ Stan 1991 12 26 456548912 tell@ Charles 1975 8 11 123154894 2eee@ can i get first …

Member Avatar for m4ster_r0shi
0
117
Member Avatar for sadsdw

Hi everyone, I'm trying develop a code to read a file containing records of INDIVIDUAL ID, FATHER ID and MOTHER ID, and re-code the file using multiple trees. At this point I'm not concerning to re-code the IDs and I would like to build the multiple tree. The idea is: …

Member Avatar for sadsdw
0
116
Member Avatar for akhal

Hi I have to pass a 2D array by reference to a constructor of a call where it manipulates this array. I have found out one way of doing so as: [code] class calc{ double (*my_a)[size]; calc(double (*arr)[size] /* or double [][size] */) : arr(my_a) {} // Passing array in …

Member Avatar for NathanOliver
0
418
Member Avatar for king03

Hi there guys I am having trouble with a particular input in my program. If you will run my program and enter the word "IT" in Enter Course, it loops and jumps to do you wish to return to the main menu. Please use Microsoft Visual C++ 6.0 Professional Edition …

Member Avatar for m4ster_r0shi
0
196
Member Avatar for m4ster_r0shi

I have two code snippets that involve recursive manipulation of std::strings. [B]code snippet 1[/B] [CODE]#include <iostream> #include <string> void print_stuff(int min_n, int max_n) { struct local { static void build_stuff( int min_n, int max_n, int cur_n, int cur_c, int max_c, bool inc, std::string & ret) { if (cur_c == max_c) …

Member Avatar for m4ster_r0shi
0
242
Member Avatar for zachmandude32

Compiler: gcc and/or g++ Linux: Mac OS X 10.6.7 curlpp version: 0.7.3 -Hi I am having trouble compiling my cpp program, I am just trying to do an example from the curlpp website [URL="http://tinyurl.com/3auvcjo"]http://tinyurl.com/3auvcjo[/URL] . I am using that code exactly. Also I've tried to search online to see what …

Member Avatar for zachmandude32
0
1K
Member Avatar for Thisisnotanid

Hi everyone. I've decided to learn C++ and have come to the inescapable step of having to choose my development environment. I have a short list of IDE's I'm considering but, since I'm new to C++ and programming in general, I'm confused as to which I should pick. I've taken …

Member Avatar for Moschops
0
232
Member Avatar for AW8Dragon

Hello everyone, this is my very first post in this webpage so here we go. I've got this problem with my hw assignment, it's almost finished except for one part. The hw is as follows: - Create an address book, creating 4 text files in the computer memory. Each text …

Member Avatar for AW8Dragon
0
405
Member Avatar for mybluehair

I'm testing out a new program I'm about to make, and created a nice 1280 X 960 BMP image in Photoshop of a field with grass. When I try to load this image into my c++ program running Allegro, the image looks AWFUL. Some of the grass has turned blue, …

Member Avatar for gusano79
0
130
Member Avatar for Vidgie65

These are the last few errors in my code that I am having issues with. Please provide some direction or thought as to what to do to fix it. generator.cpp(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int generator.cpp(11) : error C4430: missing …

Member Avatar for mike_2000_17
0
380
Member Avatar for adityasingh

Need help in making a program on library management... project {300-400) lines can anybody tell me member functions for this program.:( it's a school project.. needed only a small program on the topic...and without header file graphics.h i am very new to c++ language.. so pls help me guys .. …

Member Avatar for Moschops
0
111
Member Avatar for xpartmgr

I am new to C++ and have a question about include files. I have some classes that I want to share between the main and other classes also. So I include the reference in my main and also in my class. However, this causes a compiler error. If I comment …

Member Avatar for xpartmgr
0
162
Member Avatar for emmaand

Hello, I am a total beginner at c++ I am writing a console program and I am wondering how I should do to exit the program, like if the user is asked Do you want to continue ( yes/no) and the user enters no then I want the console to …

Member Avatar for murnesty
0
8K
Member Avatar for merse

How to initializing a const set with list of values? I want to initialize in the preambulum, so I dont want to define and initialize an array before initializing the set. I want to do this in one row, if it is possible.

Member Avatar for lcordero
0
2K
Member Avatar for niggz

Hello everyone. I am working on my final project at university for C++, and I got stuck a little. I have an array inside an array. And I want to access that inner array's member and print it with cout. Here is the code: [code=c] void standings(userClub uc){ cout << …

Member Avatar for niggz
0
407
Member Avatar for bopiqz

I am currently doing a project to build a control system for vertical take off and landing operation of UAV (unmanned aerial vehicle. I have one C++ coding but there are too much error in it and I've no idea how to solve it. Can anyone help me to fix …

Member Avatar for Celtrix
-2
119
Member Avatar for Celtrix

command line/terminal arguments are driving me bananas according to most of my google searchs this should work by the way i am using g++/gcc version 4.6.0 [CODE] #include <iostream> #include <string> using namespace std; int main(int argc, char **argv){ if(argc==0){ cout<<"Use -l or -ls!\n"; } if(string(argv[1])== "-l"){ //code for lua …

Member Avatar for Celtrix
0
169
Member Avatar for pickku

sir, I have written a program in VC++ which acquires signals from a kit. I want to run that program for only 15 seconds then it should stop automatically.can you tell how to do this

Member Avatar for yoni0505
0
57
Member Avatar for MareoRaft

What is the difference between "int main(void)" and simply "int main()"? Is "int main()" acceptable?

Member Avatar for Raphaelnad
0
453
Member Avatar for king03

Hi there guys I am looking for a way on how I can increment an object from a structure which is an integer type. the string types I have Increment well but the int types do not. it says int[int] is invalid for array subscript. The red font on my …

Member Avatar for WaltP
0
116
Member Avatar for programing

hi i hope you to help me . my teacher in introduction to programming concept course ask me to make a small realy small compiler that i did not study before .. i don't have any idea about compiler never if you can give me tutorial about it ..plz i …

Member Avatar for rubberman
0
241
Member Avatar for L0s3r

Hello guys. I currently code in C++.But I want to gain knowledge of internals of C++.So , I want to analyse my each and every program in ASM. I use Windows 7 platform and code::blocks.Please provide necessary information or tools , which can help me in this regard. Thanks!

Member Avatar for gusano79
0
226

The End.