General C++ Programming - January 2012 (Page 34)

template question
 
Hi , from some previous thread i tried to construct a clas.. template<class T> class myvector { private : T a; public: template<class U> myvec...
[5 replies] Last: thanks aquaz and Ivan Sidarau it worked . (by bluecoder)
Undefined reference to 'function(char*, char*) in g++
 
Hi all, I've been stuck on this for a while now and haven't find anything relevant on forums...or maybe I just suck at searching... but here's my little piece o...
[2 replies] Last: I did forget to link words.cpp...thanks a lot! (by bricebanel)
can someone see the fault in my program?
 
i was making a program for my exam but if i run i can type a line of text but after that if u click on enter it does nothing. the program need to do: if there ...
[4 replies] Last: the problem is that whe may not use state machine solve, but ty @ oct... (by schaapn)
How does one mould the shape of the window of the dialogue and apply a template to it?
 
In any language what so ever it must be C++ because this a C++ forum but how do you skin it and do all that fancy stuff and make it look like a dock application...
[4 replies] Last: well you know like a program like ObjectDock Or circle dock? (by Falconsoft)
problem with list iterator
 
I'm comparing all elements in a std::list for object collision, my problem arises when I try to do this: std::list<Asteroid>::iterator otherObject = current...
[12 replies] Last: thanks Moschops.. (by bluecoder)
Capacitors...
 
Hi everyone :D, I know this is not C++ but can I please ask a question related to electronics? Q: How do capacitors discharge when the current is going on...
[1 reply] : The transistor is saturated, So V_7 \approx 0 and V_2 = 2/3 V_{cc} Ne... (by ne555)
by qiqi
what's the problem of this code that causes segmentation fault?
 
Hello, Here below is a piece of code, could you please help figure out what its problem is? It permutes a string, and uses recursion. It has no compiling err...
[7 replies] Last: Thanks Moschops for your helps! The memory "new"ed during recursion i... (by qiqi)
header file problem
 
im abit fatigue from programming all day so forgive me if i keep this short anyway, i have a problem. the problem is in my .cpp file, i need to declare th...
[5 replies] Last: extern applies to anything you can create an instance of. what does ... (by Moschops)
by jorgen
char array mysteriously changing name
 
I'm trying to use a function to create a filename, but somehow the char array changes (a '3' is added) between running the function and back in main(). Here's t...
[3 replies] Last: Of course, how could I miss that! The reason I'm using char arrays: I... (by jorgen)
how to check if input is an integer?
 
for example, something like this int i; cout << "Enter integer\n"; cin >> i how do i check if i is indeed an integer? and if it isnt, return to previo...
[3 replies] Last: but still you want to check if( isdigit(i) ) { stringstream stri... (by bluecoder)
Data Structure for boolean expressions
 
Say I have a Boolean formula: F = "a and b or (c and b) and (a and b)" (some random expression) Can anyone suggest a data structure that I could parse this int...
[5 replies] Last: I suggest you using a Composite pattern for the boolean expression. A ... (by aquaz)
Using C++ to generate/manipulate sound and waveforms
 
Hiya, 1)I'm looking for a way to manipulate sound using code in the following manner. Basically, when one uses some sort of audio software, you are able to ...
[no replies]
A display function
 
Hiya, I'm programming a custom graphics engine of sorts, and I'm new on the coding bandwagon (having only designed the flow of the engine, and having learned...
[3 replies] Last: Thank guys; very helpful. I wasn't familiar with SFML, and it looks p... (by Gnarlyman)
Template vs. float/double datatype
 
Hi all I am writing a vector 3 class. Since I would like to make it able to work on several numerical data types (including floats, doubles, among other...
[5 replies] Last: You didn't add a template<class U> to the implementation. By the way, ... (by hamsterman)
by manni
Wizz kids needed
 
i have a tricky question in which i need help with the terminology here it is: given a matrix A ∈ B^(m x n) and a vector b ∈ B^m, define (hashing) h,H...
[1 reply] : what does it mean for arithmetic in B to be modulo 2? It means the ... (by Moschops)
how to read and save data from and to a file?
 
as topic, is the program suppose to create the file themselves or do i need to create one?
[3 replies] Last: Show us the code that doesn't work. ifstream means InputFileStream. ... (by Moschops)
by Mats
Recommended Compiler
 
I am using MinGW under Windows at the moment (with CodeBlocks). I have seen some people saying that MinGW is not a good compiler to use, although I am not sure ...
[7 replies] Last: THanks Mats (by synno)
by manni
Hard wiring? - for the brainiacs on this forum
 
Hi i have a technical question that i would like to put to you: here it is: or can anyone please explain to me what it means to "hardwire" in this context. ...
[2 replies] Last: Thanks so you mean, fix a value of the input. and use this value to a... (by manni)
Floating point exception
 
I'm assuming that you lot know much better than I do with this, so what does the error "Floating point exception" mean? By the way, my long answer to Questio...
[2 replies] Last: This is what happens when you try to use 0 in the modulus operator: ... (by Moschops)
undefined symbol string
 
I started using the c++ program. But when I run the program, the error message " undefined symbol 'string' comes. kindly guide me in this regard.
[3 replies] Last: Be sure to #include <string> and when you use string, use it as ... (by Moschops)
January 2012 Pages: 1... 3233343536
  Archived months: [dec2011] [feb2012]

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