General C++ Programming - February 2013 (Page 37)

The problem with the SDL
 
I used the SDL to add a picture in the background, and the program works but it truned white and then it showed "the program stoped working". My picture "hellow...
[no replies]
by pwd
Need Help with Randomness
 
I'm having difficulty coming up with the correct code for the following problem. Let's say I have 100 cupcakes and I have to randomly give it out to random b...
[2 replies] Last: int main() { srand(time(NULL)); if(rand()%2 == 0) ... (by BigBlackSheep)
Need help on a simple program
 
I am trying to display num + num + num = sum for example: Enter size: 3 first number 1 second number 2 third number 3 The sum of: 1 + 2 + 3 = 6. <- trying ...
[14 replies] Last: I like using arrays. It makes sense to me more. (by greenleaf800073)
Input while continually running
 
I am making a timer but I want to have an input while it is running. Here is my code. #include <iostream> #include <cstdio> #include <cstdlib> #include ...
[10 replies] Last: I'm going to do some work... (by greenleaf800073)
program stands still SO CONFUSED
 
Hey guys this is really messing with my head. Thanks in advance for any help yall can give me. I am trying to write a simple number sequence type program for s...
[8 replies] Last: Wait, how did that help? Sorry, I don't use those terms much. (by greenleaf800073)
Understanding placement new
 
Ok so I can't seem to find really anything useful of placement new. I have this example: (variable naming here is super useful \sarcasm) void construct(T * co...
[7 replies] Last: Well, I think I need to use in my allocation class. I'd prefer to keep... (by ResidentBiscuit)
by PPAC13
Vector, string, int, and parameters.
 
Hey all, I've been writing a program for a week. I have a class with private string vectors and a few public set and get functions to set and call them up. This...
[7 replies] Last: I finally got it work. Sorry for the late response. Thank you all for ... (by PPAC13)
c++ string
 
i'm using string.h header file in c++. and i'm trying to use string name ; //to store 100 name examples why is it it says undefined symbol string? is there...
[17 replies] Last: thanks guys for your replies. actually i'm new in this language. i'm l... (by charmcaster2549)
by ostar2
Printing unicode characters with key id
 
Hi, I want to print out unicode characters. But I want to do this using the key ids. Example: int main() { std::cout << ('124'); //I would like this to o...
[2 replies] Last: Thanks! (by ostar2)
Components
 
Hello everyone... can anybody help me with that please! which component like a memo, the c++ borland give us? I want a component to add a text but also...
[no replies]
.csv file (1,2)
 
I have a Book1.csv file. It contains list like this: bones, origin ,deep or superficial,location,action frontal,cartiledge,deep,cranial,flexes arms Now, how...
[22 replies] Last: Please someone help me. I would greatly appreciate it :] I need to cr... (by Stephanie)
Adding external libraries
 
I'd like to use the Big Integer Library (https://mattmccutchen.net/bigint/), but I have issues to use it. I'm using Xcode as compiler and I don't know how to in...
[1 reply] : What are the compiler errors? Copy and paste exactly what you are gett... (by LB)
Help with minesweeper
 
Hey guys i dont know how to progress to finish off my minesweeper game i have no idea how to match the co-ordinates with the mines so that the player can find s...
[no replies]
Why does my compiler let me do this...
 
Was reading an article on dynamic memory allocation here... http://www.cplusplus.com/forum/articles/416/ Why does my compiler (g++ that comes with cygwin)...
[2 replies] Last: GCC has the option -pedantic to flag supported deviations from the s... (by Cubbi)
instance of generic classes
 
Hi - I'm trying to create a generic class with template functions (first time doing this). The class looks something like this: template <class T> class ...
[4 replies] Last: Oops...my mistake, Disch. This was originally a non-template class. Wh... (by mzimmers)
MOD% to output new line every 10 characters
 
void printList(int list ,int cnt,int numsPerLine){ for(int i=0;i<cnt;i++){ cout<<list <<" "; if((i%numsPerLine)==0) cout<<"\n";...
[1 reply] : if( i && i%numsPerLine == 0) cout<<"\n"; Don't do it when i is 0... (by LB)
by Alx101
Memory corruption, but only in release mode
 
Hello! I am currently using MS Visual Studio 2010 and started working on a project. However in debug mode everything works just fine, but as soon as i switch to...
[2 replies] Last: I'll fix the destructor, and no, there is no need for dynamic allocati... (by Alx101)
by gws923
Getting an error that my pure virtual functions aren't defined, but they are
 
Hi there. I'm just trying to compile a simple little application to test a library that I'm working on. I'm getting an error that two pure virtual functions...
[4 replies] Last: Figured it out. I had to specify in Ball's declaration of the methods... (by gws923)
by rero92
std namespace
 
guys I need your help I can't understand how I to use std namespace I hope to help me in fastest time
[6 replies] Last: TheIdeasMan It was my fault, but I realize that now. It happens to b... (by kaidto)
does college prepare you for real world
 
Hi guys, I have a quick question for those people who are programmers as their career. Did you learn most of what you needed to know in college, or did you lear...
[9 replies] Last: Well, college gives you an introductory idea of what you will experien... (by kaidto)
February 2013 Pages: 1... 3536373839... 43
  Archived months: [jan2013] [mar2013]

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