Beginners - January 2011 (Page 30)

by GulHK
compare vectors for inequality
 
Hello everyone I have to compare two vectors (having struct data from two different files) for inequality. The two vectors contain struct type of elements. ...
[2 replies] Last: Duoas! the structures are actually different. They have different numb... (by GulHK)
by cdummy
Changing a bit?
 
Hi may be it's easy but I can't find a solution how to change only one bit from a digit. example: 181 = 10110101 wish to find and change the fifth posision(1)...
[2 replies] Last: You need to learn about the bitwise logical operators. See here: htt... (by guestgulkan)
Does MingW come with an assembler?
 
I hope I am not off-topic. This forum is about C++ and I would like to keep it that way. But since my problem is also related to an application which is further...
[2 replies] Last: Yes thank you Bazzy. I finally decided to go with NASM, but the proble... (by Zia Ur Rehman)
Maximum array size?
 
int arr ; What can be the max size of n? And for that matter, what can be the max length of a string? If I want to open a 1G file and store it's contents ...
[7 replies] Last: what compiler do you use? MingW GCC... The IDE is Code::Blocks. I s... (by Zia Ur Rehman)
I know it can be done
 
I've even seen threads HERE about it... but guess who didn't pay attention... and who can't find it again because he doesn't know the correct terminology to sea...
[2 replies] Last: thanks, it worked perfectly (by closed account 4Gb4jE8b)
by qwe123
2d array function
 
Hi, I am trying to build a 2D matrix and fill the first row and column with zeros. However, I want to do this in a function, but I have huge problems doing t...
[1 reply] : int test2 = { {0} }; std::copy(test2 , test2 + 4, std::ostream_... (by stereoMatching)
Why pointers? WHY?!?!!?!
 
Sorry, but countless tutorials, views of source codes and even use of pointers myself and I still can't see what they really are useful for. I mean I know what ...
[10 replies] Last: Even we are not able to do polymorphism without addresses in C++. Ho... (by lionishy)
What does ref mean?
 
If I create class using visual studio I get the option of selecting whether I want some managed code. ref class platformDependent { public: platformDepe...
[6 replies] Last: Anyone heard of MonoDevelop? I tried running a C# and C++/CLI windows ... (by blackcoder41)
Don't quite understand rand().
 
I'm new to C++ and am following a guide and one of the exercises is to make a magic number guessing game. You use rand() to generate a random number but when i ...
[6 replies] Last: So basically copywrites disallow "copy, paste, this is mine!" That's ... (by Browni3141)
Switch and Case issues
 
I read the article here, and some stuff online but don't understand. Is a switch block a smaller If...Else statement? here is my code: // CODE #inclu...
[1 reply] : this is what i came up with. some correction on what i "think" your tr... (by acorn)
by gigiez
My Program Can't Run
 
Hello guys im newbie... i try create one program with borland C++ 5.02. but whne i try to run program found error and stopping program. for my task in schoo...
[3 replies] Last: hi friend..., i tried to understand what you up to with your program, ... (by hasula)
Read line by line from a file into an array
 
I am trying to read line by line in a file and store each line in a position in my array. Here is my attempt but it doesn't give me an error rather it crashes m...
[3 replies] Last: while( (fgets(readarray, 25, f))!=NULL){ // 25>10 You could avoid t... (by ne555)
Vectors of Pointers
 
vector <someObject *> vb; vb.push_back(new someObject ()); vb.push_back(new someObject ()); vb.push_back(new someObject ()); vb.push_back(new someObject (...
[7 replies] Last: well i have not used such a thing but anyway you can create an interfa... (by aktyagi)
by Crutoy
Palindrome
 
Hello, Another exercise. In this particular problem we are given a five digit integer and program have to determine if its a Palindrome. Author states that we h...
[8 replies] Last: Thanks for the input , but arrays are not covered therefore violate t... (by Browni3141)
Alias for a member variable
 
class LongitudeLatitude : public std::pair<double,double> { }; Now that class has 2 members at least. Namely first and second. Say loc is an obj...
[3 replies] Last: Basically yeah. You'd make Latitude and Longitude member vars as refe... (by Disch)
by acorn
issues with your trick duoas
 
Duoas im trying to implement your cleanest method of keeping the window open. It seems best option compared to system calls and other tricks. However I have a p...
[5 replies] Last: acorn My knowledge of the iostream is rather limited. Of cause, ... (by lionishy)
require_once
 
is a PhP languange What's the equivalent in C++
[10 replies] Last: Then in some other file someone in your team does the same again in a ... (by kbw)
output doesn't show following do/while loop
 
#include <iostream> using namespace std; int main () { int x, a = 1, INT_MAX, INT_MIN, sum = 0; char response; double avg; do { cout << "...
[7 replies] Last: Just fix the errors I've pointed out and you should be good. (by Return 0)
by reacen
Is Qt socket a fast solution?
 
Hello, can some one please help me? I need to know if I can rely on Qt socket solution to make a well optimized game server that can handle at least 50.000 P...
[4 replies] Last: You might as well consider not using sockets at all, and try asynchron... (by rapidcoder)
Cope letters until space is reached
 
So I have this string: char *string = "amiral 1 1 H"; I want it to basically copy 'amiral' or all the letters until it reaches the first space. I have made ...
[4 replies] Last: Thank you very much Moschops! That was the problem and the solution wo... (by Bman900)
January 2011 Pages: 1... 2829303132... 42
  Archived months: [dec2010] [feb2011]

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