General C++ Programming - December 2013 (Page 6)

expected unqualified-id before '{' token
 
hi, i have an expected unqualified-id before '{' token. the error message reads this: Main.cc:6:1: error: expected unqualified-id before '{' token This is...
[1 reply] : Lines 5 and 15. You have semicolons after the function headers. Remo... (by AbstractionAnon)
by wahhaj
Declaring an array of hexadecimals
 
I'm making a flash card type console application using visual studios 2013. The flash cards contain character that I can display using unicode. So far I am look...
[3 replies] Last: @wahhaj Line one is nothing but a comment. That was just the name I g... (by whitenite1)
Inconsistent Application Behaviour depending on directory
 
Okay... So I am running MSVC++ 2010 on Windows 7. I created an application that reads a text file from a directory, and stores it as an object which is used ...
[3 replies] Last: > Client code? how you are using your class. http://www.eelis.net/iso-... (by ne555)
complex bitwise operation
 
I am reading the following example from the book: /* getbits: get n bits from position p */ unsigned getbits(unsigned x, int p, int n) { return (x >>...
[3 replies] Last: The type of the expression 0 is int , which is indeed 32 bit on almo... (by Cubbi)
CopyFile error 5, access denied
 
Alrighty so I was messing around building some stuff in c++ because that is what us nerdy computer science majors do inbetween semesters right? So I am trying t...
[2 replies] Last: CopyFile() doesn't work on directories. When copying folders and their... (by Computergeek01)
Bitwise Shift
 
I understand how bitwise shift operators work. But in book, it appears that they work differently for signed and unsigned integral types. Specifically, the book...
[1 reply] : arithmetic shift is one that follows the arithmetic definition of righ... (by Cubbi)
Error: no type named "shared_ptr" in namespace std
 
I included the <memory> header in my program, and tried to use std::shared_ptr and I get an error that no such type exists, from Clang with -std=c++11 active. ...
[5 replies] Last: Compile with -stdlib=libc++. Worked! (by Caleb P)
by jaded7
setting all but MSB on signed long long
 
Hi, I tried to write a little bit of code to set all bits within a signed int with exception to the MSB, yielding the greatest max positive value. The odd part ...
[2 replies] Last: Ahh, I see, thank you. Also, I know numeric limits has this- this is ... (by jaded7)
structure padding
 
HI, I am executing the following code there is no difference,why? #include <stdio.h> #include <string.h> struct structure1 { int *id2; ...
[3 replies] Last: What is "use without pointer"? A structure holding a single char membe... (by Cubbi)
Most effecient way to average scores?
 
Hello all i am wondering what would be the best way to have a user input up to but not required to 20 test scores, average them, and display the average of all ...
[3 replies] Last: Well thank all of you for the input i was away for a couple days but, ... (by seanjames192)
by Fliize
Issue running program on different PC
 
Hi! I reopened one of my old projects which uses the mingw32, working on CodeBlocks. I can easily run it from the IDE itself, but when trying to do it from the...
[3 replies] Last: Thank you about the dependency walker, I'm sure it will be useful ;) T... (by Fliize)
URGENT
 
I need the code so badly...I'm having exercise and i know nothing about queue. Anyone please help me. Question: Write a C++ programming using queue impleme...
[3 replies] Last: we arent going to write code for you. you have to show us what youve d... (by closed account Dy7SLyTq)
Encryption for mobile app
 
We are developing some diagnostic app(mobile application) and finding difficulty in selecting encryption technique. Let us know if some has an idea/link. I ...
[no replies]
email validation in c/c++ without using regular expressions
 
Hi, Can anyone help me for writing a program for "Validating the e-mail id without using regular expressions in c/c++"?
[4 replies] Last: HI, Please verify it. I hope this is not a complete picture for valid... (by Ajaycpp)
BlackJack Program Setup
 
So I have recently received a new assignment in class to create a blackjack program. I have been out for quite a few classes and it's affected my ability to do ...
[8 replies] Last: @pivottt Thanks a lot for explaining all that man. I really appreciat... (by MasterMathematician)
Allegro 5 platformer collision problem
 
This is my first platformer game I've made. Also, I'm a beginner to Allegro and c++ so the code is probably bad. Collision works fine except for a little proble...
[7 replies] Last: You don't know what a mathematical vector is? I think you should hold ... (by closed account N36fSL3A)
by Kubani
How to convert a text file into binary and vice versa?
 
Hello guys, I have made the previous problem simpler to get the answer and understand it completely. The problem is that I want to write a C++ program that con...
[9 replies] Last: OK, thank you. But what about the question I asked just below of the c... (by Kubani)
how is this generating a random number?
 
In the following line of code: unsigned long int next = 1; /* rand: return pseudo-random integer on 0..32767 */ int rand(void) { next = next * 110...
[1 reply] : It's a (very poor quality by today's standards) linear congruential ge... (by Cubbi)
Code isn't working
 
Hello! Well, I have an issue again, the thing is that in the second loop I have written s = wtf.at(x-1+i); Now the things is that the program crashes because I...
[2 replies] Last: Well, any ideas how I can get a consecutive loop / if-statement? I di... (by closed account o2ASLyTq)
map<string, int> is faster than map<int, string>?
 
The following example times how long it takes to build a map<int, string> and a map<string, int> both of 500 000 elements, where the strings are generated rando...
[6 replies] Last: @JLBorges and @Catfish666 and @NT3 Thank you so much, especially to J... (by benbalach)
December 2013 Pages: 1... 45678... 37
  Archived months: [nov2013] [jan2014]

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