General C++ Programming - March 2011 (Page 9)

merging a vector of vectors of int and a vector of int
 
Hello I am a beginner in C++ and I am having trouble merging and sorting 'the vector of vectors of integers' and 'vector of integers'. I have, (1) std...
[4 replies] Last: Oh... Thank you. It works now I did std::vector<std::vector<int> > ... (by alex460)
Please help me in Binary XOR operation using C++?
 
Please help me in Binary XOR operation.... This program will ask user to enter their input..After that the program will convert to Binary Code for each charac...
[1 reply] : Why? Just use ^ .... (by ultifinitus)
Facing some problem
 
#include<iostream> #include<cstring> using namespace std; int eval(char X ,int l,int r); int main(){ char X ; cout<<"Please enter an equation:"; cin>>X; //...
[9 replies] Last: If arr is an array of chars, its name converts to a pointer to char, b... (by filipe)
Function pointers
 
I am trying to use a function pointer to allow a function to hook events in a class. The callbacks look like this typedef bool(* SfuiEventCallback)(class s...
[2 replies] Last: Yes, you're right, that fixed it. Thanks filipe! (by chrisname)
Pointers to classes to structure ?
 
Hi Guys! My task is to check if a circle belongs to a rectuangle using pointers, struct point and class okr; rect. I think i finished the program but i got se...
[1 reply] : I think i finished the program but i got send/don`t send error. what?... (by coder777)
What is wrong with my casting in this program?
 
I am having trouble casting an integer to string in this program. #include "stdafx.h" #include <sstream> using namespace std; int x1,x2,x3,x4,x5; ...
[3 replies] Last: You do realize that you can't just add to string literals, right? You... (by Asif Hirai)
Very Frustrating Errors
 
I'm using Code::Blocks to make a command line program. Whenever I try to compile I get a "using-declaration for non-member at class scope" error. I have two c...
[3 replies] Last: You should include the headers that you use. string may be included... (by moorecm)
by toks
wrong elapsed time
 
Hi friends, i am using the code below: #include <pthread.h> #include <stdio.h> #include <stdlib.h> /* The following structure contains the neces...
[3 replies] Last: Thanks kbw i will change this. Nice question jsmith, i just checked i... (by toks)
by oz1cz
Superiority of unnamed namespaces over static
 
Unnamed namespaces are supposed to be a superior alternative to the static keyword. I do not understand what an unnamed namespace gives you that cannot just ...
[5 replies] Last: Thank you for that, Bazzy. That was helpful! According to http://stac... (by oz1cz)
code error
 
hi, I'm fairly new to c++. I found this generic question is a book asking to spot the error in the code, but no answer was given. this has been doing my head fo...
[2 replies] Last: if A::f() is not a const method, your function will have no effect on ... (by bartoli)
Alternative to fwrite in C++ other than fstream and ostream (1,2)
 
Hello guys, writing binary files with fstream is really annoying. I noticed that it formats the numbers and modifies their precision, and it's twice slower c...
[21 replies] Last: After you learn endiannes (little endian, big endian), I'd advise you ... (by TheDestroyer)
by aiby
fstream::clear
 
Hello guys, I got the eofbit and failbit when we readed the file end. My question is if How can I clear the eof and fail stat whith out fstream::clear. Is th...
[10 replies] Last: Okey,anywhere,Thanks! (by aiby)
i am not getting desired output
 
this is part of my program, can anyone tell me what went wrong in it because of which i am getting unacceptable output: srand(4); cout<<"Centroi...
[3 replies] Last: Sorry I give you wrong answer.Can you put on more Code? (by aiby)
Pointers in C
 
I have a pointer that points to an array of MenuItem object pointers that points to MenuItem Objects The following link should help explain what I am doing w...
[2 replies] Last: Assuming the menuitem array is being created dynamically using new ... (by guestgulkan)
by sara90
sorting problem
 
hello every one i make a project about linked list and do some functions on the linked list i want to sort the name in the linked list alphabetical i wrote th...
[4 replies] Last: thank you so much. you helped me a lot :) (by sara90)
C++ USB control
 
Hello friends i want to ask you if you can give me advice what i should learn in C++ to control USB things... I must do 1 job in school to control 3 LED Diod...
[5 replies] Last: mob has cleared all the things in one post. I completely agree with hi... (by Esspweb)
How to cross-compile on cygwin?
 
Hello, I'm using a full installation of cygwin and need to cross compile for i368 unknown gnu linux. I've tried a special cross-compiler i found, But it do...
[no replies]
How to compile an program using ncurses static
 
Hello, I'm developing my own os from the bottom up (it's based on linux). I'm using cygwin and windows. I've got a special cross-compiler (gcc/g++ based) for t...
[8 replies] Last: Since the topic is solved by the link to the article at belsky.info An... (by roelf01)
by pieee
If statement problem
 
Hey guys, newly registered but regular lurker, I am having a problem with a script I'm writting for uni, the question is as follows: During the tax season, an ...
[6 replies] Last: Thanks guys, you's have helped out loads, got everything to work but n... (by pieee)
Unresolved Externals - It looks fine to me.
 
I think I'm just oblivious to something that should be screaming out to me...but can anyone spot where the linker is complaining? I've snipped the static looku...
[no replies]
March 2011 Pages: 1... 7891011... 31
  Archived months: [feb2011] [apr2011]

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